Sha256: daa318c350ea14ac2cdcf5397febb4b5eef74402fe70461d572abfaba3c40234
Contents?: true
Size: 712 Bytes
Versions: 3
Compression:
Stored size: 712 Bytes
Contents
require 'spec_helper' describe "Adding items to collections: " do let(:user) { FactoryGirl.create(:user) } let!(:collection) { FactoryGirl.create(:public_collection, user: user, title: 'Collected Stuff') } let!(:work1) { FactoryGirl.create(:generic_work, user: user, title: 'Work 1') } before do login_as(user) end it "adding an item from the catalog page" do work1.collections.should == [] visit catalog_index_path within "#document_#{work1.noid}" do click_on 'Add to Collection' end within "#main form" do select('Collected Stuff') click_on 'Add' end reload = GenericWork.find(work1.pid) reload.collections.should == [collection] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
curate-0.5.1 | spec/features/adding_items_to_collections.rb |
curate-0.5.0 | spec/features/adding_items_to_collections.rb |
curate-0.4.2 | spec/features/adding_items_to_collections.rb |