Merge pull request #553 from mperezv/fix/remove-repeated-specs

Remove offers controller specs which were already on offers view specs
This commit is contained in:
Pau Pérez Fabregat
2020-03-03 12:49:36 +01:00
committed by GitHub
+1 -20
View File
@@ -100,11 +100,6 @@ RSpec.describe OffersController, type: :controller do
get :show, id: offer.id
expect(assigns(:destination_account)).to eq(member.account)
end
it 'displays the offer\'s user details' do
get :show, id: offer.id
expect(response.body).to include(offer.user.email)
end
end
end
end
@@ -118,11 +113,6 @@ RSpec.describe OffersController, type: :controller do
allow(controller).to receive(:@current_organization).and_return(another_organization)
end
it 'displays the offer\'s user details' do
get :show, id: offer.id
expect(response.body).to include(offer.user.email)
end
it 'sets the offer\'s organization as user\'s current organization' do
get :show, id: offer.id
expect(session[:current_organization_id]).to eq(offer.organization_id)
@@ -136,11 +126,6 @@ RSpec.describe OffersController, type: :controller do
let(:another_user) { Fabricate(:user) }
before { login(another_user) }
it 'doesn\'t display the offer\'s user details' do
get :show, id: offer.id
expect(response.body).to_not include(offer.user.email)
end
end
context 'when the user is not logged in' do
@@ -148,11 +133,7 @@ RSpec.describe OffersController, type: :controller do
get :show, id: offer.id
expect(assigns(:offer)).to eq(offer)
end
it 'doesn\'t display the offer\'s user details' do
get :show, id: offer.id
expect(response.body).to_not include(offer.user.email)
end
end
end