Skip to content

Commit

Permalink
Remove deprecated method call in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Apr 30, 2015
1 parent d573e7b commit e92294c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/datagrid/drivers/active_record_spec.rb
Expand Up @@ -6,7 +6,7 @@
subject { described_class }

it {should be_match(Entry)}
it {should be_match(Entry.scoped)}
it {should be_match(Entry.where(:id => 1))}
it {should_not be_match(MongoidEntry)}
end

Expand All @@ -17,7 +17,7 @@
end

it "should support append_column_queries" do
scope = subject.append_column_queries(Entry.scoped, [Datagrid::Columns::Column.new(test_report_class, :sum_group_id, 'sum(entries.group_id)')])
scope = subject.append_column_queries(Entry.where({}), [Datagrid::Columns::Column.new(test_report_class, :sum_group_id, 'sum(entries.group_id)')])
expect(scope.to_sql.strip).to eq('SELECT "entries".*, sum(entries.group_id) AS sum_group_id FROM "entries"')
end
end
2 changes: 1 addition & 1 deletion spec/datagrid/drivers/mongo_mapper_spec.rb
Expand Up @@ -9,7 +9,7 @@
it {should be_match(MongoMapperEntry)}
# MongoMapper doesn't have a scoped method, instead it has a query method which returns a Plucky::Query object
it {should be_match(MongoMapperEntry.query)}
it {should_not be_match(Entry.scoped)}
it {should_not be_match(Entry.where(:id => 1))}

end
describe "api" do
Expand Down
2 changes: 1 addition & 1 deletion spec/datagrid/drivers/mongoid_spec.rb
Expand Up @@ -8,7 +8,7 @@

it {should be_match(MongoidEntry)}
it {should be_match(MongoidEntry.scoped)}
it {should_not be_match(Entry.scoped)}
it {should_not be_match(Entry.where(:id => 1))}

end
describe "api" do
Expand Down
2 changes: 1 addition & 1 deletion spec/support/simple_report.rb
Expand Up @@ -33,7 +33,7 @@ class SimpleReport
filter(:confirmed, :boolean)

filter(:name) do |value|
self.scoped(:conditions => {:name => value})
self.where(:name => value)
end

column(:group, :order => "groups.name") do
Expand Down

0 comments on commit e92294c

Please sign in to comment.