Sha256: ab3e86fab0f05423d313e127d200caee44657a88f47d0f434cc63c7926519714
Contents?: true
Size: 1011 Bytes
Versions: 31
Compression:
Stored size: 1011 Bytes
Contents
require 'spec_helper' require 'flapjack/data/entity' describe Flapjack::Data::Tag, :redis => true do it "adds references to tags" do tags = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis) tags.should include('carbon') tags.should_not include('chocolate') tags.add('chocolate') tags.should include('chocolate') end it "deletes references from tags" do tags = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis) tags.should include('apple') tags.should include('button') tags.delete('button') tags.should include('apple') tags.should_not include('button') end it "lists references contained in a tag" do t1 = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis) t2 = Flapjack::Data::Tag.find('special', :redis => @redis) t2.should include('apple') t2.should include('carbon') t2.should_not include('chocolate') end end
Version data entries
31 entries across 31 versions & 1 rubygems