Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Do not hard code ID in client token controller spec
Browse files Browse the repository at this point in the history
As we do not truncate but rollback the test database it happens
that the ID is alrerady present and will fail the unique index.
  • Loading branch information
tvdeyen committed Oct 27, 2017
1 parent 688c48b commit c7ded48
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
end

context 'with a payment method id' do
before do
create_gateway id: 3
end

subject(:response) do
post :create, params: { token: user.spree_api_key, payment_method_id: 3 }
post :create, params: { token: user.spree_api_key, payment_method_id: gateway.id }
end

it 'uses the selected gateway' do
expect(json["payment_method_id"]).to eq 3
expect(json["payment_method_id"]).to eq gateway.id
end
end
end
Expand Down

0 comments on commit c7ded48

Please sign in to comment.