spec/controllers/spotlight/contacts_controller_spec.rb in blacklight-spotlight-1.0.0 vs spec/controllers/spotlight/contacts_controller_spec.rb in blacklight-spotlight-1.1.0

- old
+ new

@@ -1,21 +1,21 @@ describe Spotlight::ContactsController, type: :controller do routes { Spotlight::Engine.routes } describe 'when not logged in' do describe 'GET edit' do - let(:contact) { FactoryGirl.create(:contact) } + let(:contact) { FactoryBot.create(:contact) } it 'is successful' do get :edit, params: { id: contact, exhibit_id: contact.exhibit } expect(response).to redirect_to main_app.new_user_session_path end end end describe 'when signed in as a curator' do - let(:user) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) } - let(:exhibit) { FactoryGirl.create(:exhibit) } - let(:contact) { FactoryGirl.create(:contact, exhibit: exhibit, name: 'Andrew Carnegie') } + let(:user) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) } + let(:exhibit) { FactoryBot.create(:exhibit) } + let(:contact) { FactoryBot.create(:contact, exhibit: exhibit, name: 'Andrew Carnegie') } before { sign_in user } describe 'GET edit' do it 'is successful' do expect(controller).to receive(:add_breadcrumb).with('Home', exhibit) @@ -32,10 +32,10 @@ expect(response).to redirect_to exhibit_about_pages_path(exhibit) expect(contact.reload.name).to eq 'Chester' end it 'allows thumbnails to be updated' do - contact = FactoryGirl.create(:contact, exhibit: exhibit, name: 'Andrew Carnegie') + contact = FactoryBot.create(:contact, exhibit: exhibit, name: 'Andrew Carnegie') patch :update, params: { id: contact, contact: { avatar_attributes: { iiif_tilesource: 'https://example.com/iiif',