Update helper messages in Stripe Connect config UI

This commit is contained in:
Rob Harrington
2017-10-16 10:34:50 +11:00
parent 9e40502876
commit 0d483882de
4 changed files with 8 additions and 11 deletions

View File

@@ -26,9 +26,9 @@ describe Admin::StripeConnectSettingsController, type: :controller do
allow(Stripe).to receive(:api_key) { nil }
end
it "sets the account status to :empty_api_key" do
it "sets the account status to :empty_api_key_error_html" do
spree_get :edit
expect(assigns(:stripe_account)[:status]).to eq :empty_api_key
expect(assigns(:stripe_account)[:status]).to eq :empty_api_key_error_html
expect(assigns(:settings).stripe_connect_enabled).to be true
end
end
@@ -44,9 +44,9 @@ describe Admin::StripeConnectSettingsController, type: :controller do
to_return(:status => 401, :body => "{\"error\": {\"message\": \"Invalid API Key provided: sk_test_****xxxx\"}}")
end
it "sets the account status to :auth_fail" do
it "sets the account status to :auth_fail_error" do
spree_get :edit
expect(assigns(:stripe_account)[:status]).to eq :auth_fail
expect(assigns(:stripe_account)[:status]).to eq :auth_fail_error
expect(assigns(:settings).stripe_connect_enabled).to be true
end
end