Sha256: f7b17c9943c3becea360c12c7ed196e21fd32081de8e83351ed2a8fbad9e926e

Contents?: true

Size: 398 Bytes

Versions: 62

Compression:

Stored size: 398 Bytes

Contents

require 'test_helper'

module Mongoid
  class ExceptTest < Workarea::TestCase
    class ExceptDoc
      include Mongoid::Document
    end

    def test_returns_docs_except_the_passed_id
      one = ExceptDoc.create!
      two = ExceptDoc.create!

      results = ExceptDoc.all.except(two.id).to_a
      assert_equal(1, results.length)
      assert_equal(one.id, results.first.id)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.26 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.45 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.25 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.23 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.44 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.22 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.43 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.21 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.42 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.20 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.41 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.19 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.40 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.18 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.39 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.17 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.38 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.5.16 test/lib/workarea/ext/mongoid/except_test.rb
workarea-core-3.4.37 test/lib/workarea/ext/mongoid/except_test.rb