Sha256: 3e8bbb683d899547afe361268859de527aa55d0dd30f08f5088a8ad8fc80dae1
Contents?: true
Size: 595 Bytes
Versions: 45
Compression:
Stored size: 595 Bytes
Contents
require_relative "spec_helper" describe "Sequel::Plugins::UnlimitedUpdate" do before do @db = Sequel.mock(:host=>'mysql', :numrows=>1) @db.extend_datasets{def quote_identifiers?; false end} @c = Class.new(Sequel::Model(@db[:test])) @c.columns :id, :name @o = @c.load(:id=>1, :name=>'a') @db.sqls end it "should remove limit from update dataset" do @o.save @db.sqls.must_equal ["UPDATE test SET name = 'a' WHERE (id = 1) LIMIT 1"] @c.plugin :unlimited_update @o.save @db.sqls.must_equal ["UPDATE test SET name = 'a' WHERE (id = 1)"] end end
Version data entries
45 entries across 41 versions & 2 rubygems