spec/lib/query/combination_spec.rb in picky-3.6.11 vs spec/lib/query/combination_spec.rb in picky-3.6.12
- old
+ new
@@ -25,9 +25,21 @@
describe 'hash' do
it 'should hash the token and the bundle' do
@combination.hash.should == [@token, @category].hash
end
+ it 'should distinguish two combinations sufficiently' do
+ category1 = stub :category,
+ :identifier => 'some_category_identifier1'
+
+ category2 = stub :category,
+ :identifier => 'some_category_identifier2'
+
+ combination1 = described_class.new @token, category1
+ combination2 = described_class.new @token, category2
+
+ combination1.hash.should_not == combination2.hash
+ end
end
describe 'to_result' do
context 'functional with qualifier' do
before(:each) do
\ No newline at end of file