OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/spec/models/query/results_spec.rb

19 lines
645 B

require 'spec_helper'
describe ::Query::Results do
let(:query) { FactoryGirl.build :query }
let(:query_results) do
::Query::Results.new query, include: [:assigned_to, :type, :priority, :category, :fixed_version],
order: "work_packages.root_id DESC, work_packages.lft ASC"
end
describe '#work_package_count_by_group' do
context 'when grouping by responsible' do
before { query.group_by = 'responsible' }
it 'should produce a valid SQL statement' do
expect { query_results.work_package_count_by_group }.not_to raise_error ::Query::StatementInvalid
end
end
end
end