Skip to content

Remove offers controller specs which were already on offers view specs #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions spec/controllers/offers_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@
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
Expand All @@ -118,11 +113,6 @@
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)
Expand All @@ -136,23 +126,14 @@
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
it 'assigns the requested offer to @offer' 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

Expand Down