Skip to content

Commit

Permalink
Remove some debug logging code from the prepared_statements plugin in…
Browse files Browse the repository at this point in the history
…tegration tests
  • Loading branch information
jeremyevans committed May 25, 2011
1 parent 03740f5 commit fd32deb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions spec/integration/plugin_test.rb
Expand Up @@ -1379,52 +1379,42 @@ class ::Lorem < Sequel::Model
end

it "should work with looking up using Model.[]" do
log do
@c[@foo.id].should == @foo
@c[@bar.id].should == @bar
@c[0].should == nil
end
end

it "should work with looking up using Dataset#with_pk" do
log do
@c.dataset.with_pk(@foo.id).should == @foo
@c.dataset.with_pk(@bar.id).should == @bar
@c.dataset.with_pk(0).should == nil

@c.dataset.filter(:i=>0).with_pk(@foo.id).should == nil
@c.dataset.filter(:name=>'foo').with_pk(@foo.id).should == @foo
end
end

it "should work with Model#destroy" do
log do
@foo.destroy
@bar.destroy
@c[@foo.id].should == nil
@c[@bar.id].should == nil
end
end

it "should work with Model#update" do
log do
@foo.update(:name=>'foo2', :i=>30)
@c[@foo.id].should == @c.load(:id=>@foo.id, :name=>'foo2', :i=>30)
@foo.update(:name=>'foo3')
@c[@foo.id].should == @c.load(:id=>@foo.id, :name=>'foo3', :i=>30)
@foo.update(:i=>40)
@c[@foo.id].should == @c.load(:id=>@foo.id, :name=>'foo3', :i=>40)
end
end

it "should work with Model#create" do
log do
o = @c.create(:name=>'foo2', :i=>30)
@c[o.id].should == @c.load(:id=>o.id, :name=>'foo2', :i=>30)
o = @c.create(:name=>'foo2')
@c[o.id].should == @c.load(:id=>o.id, :name=>'foo2', :i=>nil)
o = @c.create(:i=>30)
@c[o.id].should == @c.load(:id=>o.id, :name=>nil, :i=>30)
end
end
end

0 comments on commit fd32deb

Please sign in to comment.