Sha256: 9950468897b94e1522237f86a97462b1d4839e987fc21c3d5187443af3ba57a9
Contents?: true
Size: 682 Bytes
Versions: 6
Compression:
Stored size: 682 Bytes
Contents
require 'spec_helper' describe "featuring items" do context "when viewing a featured item" do let(:user) do u = FactoryGirl.build(:user) u.group_list = "admin" u.save u end it "has a working unfeature link", js: true do sign_in user file = create(:public_file) create(:featured_work, generic_file_id: file.id) visit sufia.generic_file_path(id: file.id) expect(page).to have_link "Unfeature" click_link "Unfeature" expect(page).to have_link("Feature") expect(GenericFile.find(file.id)).not_to be_featured click_link "Feature" expect(page).to have_link "Unfeature" end end end
Version data entries
6 entries across 6 versions & 1 rubygems