|
|
@ -180,13 +180,13 @@ describe CostQuery do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "filters start" do |
|
|
|
it "filters start" do |
|
|
|
@query.filter :start_date, :operator => '=d', :value => Issue.all.first.start_date |
|
|
|
@query.filter :start_date, :operator => '=d', :value => Issue.all(:order => "id ASC").first.start_date |
|
|
|
@query.result.count.should == Entry.all.select { |e| e.issue.start_date == Issue.all.first.start_date }.count |
|
|
|
@query.result.count.should == Entry.all.select { |e| e.issue.start_date == Issue.all(:order => "id ASC").first.start_date }.count |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "filters due date" do |
|
|
|
it "filters due date" do |
|
|
|
@query.filter :due_date, :operator => '=d', :value => Issue.all.first.due_date |
|
|
|
@query.filter :due_date, :operator => '=d', :value => Issue.all(:order => "id ASC").first.due_date |
|
|
|
@query.result.count.should == Entry.all.select { |e| e.issue.due_date == Issue.all.first.due_date }.count |
|
|
|
@query.result.count.should == Entry.all.select { |e| e.issue.due_date == Issue.all(:order => "id ASC").first.due_date }.count |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "raises an error if operator is not supported" do |
|
|
|
it "raises an error if operator is not supported" do |
|
|
|