Skip to content
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

Remove 'Logged in' flash message #425

Merged
merged 2 commits into from
Jun 28, 2017
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
de:
logged_in: 'Eingeloggt'
logged_out: 'Erfolgreich ausgelogt'
could_not_log_in: 'Shopify Store Login fehlgeschlagen'
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
en:
logged_in: 'Logged In'
logged_out: 'Successfully logged out'
could_not_log_in: 'Could not log in to Shopify store'
1 change: 0 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
es:
logged_in: 'Has iniciado sesión'
logged_out: 'Cerrar sesión'
could_not_log_in: 'No se pudo iniciar sesión en tu tienda de Shopify'
1 change: 0 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
fr:
logged_in: 'Vous êtes connecté(e)'
logged_out: 'Vous êtes déconnecté(e)'
could_not_log_in: 'Impossible de se connecter à la boutique Shopify'
1 change: 0 additions & 1 deletion config/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ja:
logged_in: 'ログイン'
logged_out: 'ログインに成功しました'
could_not_log_in: 'Shopifyストアにログインできませんでした'
1 change: 0 additions & 1 deletion lib/shopify_app/sessions_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def callback
install_webhooks
install_scripttags

flash[:notice] = I18n.t('.logged_in')
redirect_to return_address
else
flash[:error] = I18n.t('could_not_log_in')
Expand Down
15 changes: 0 additions & 15 deletions test/controllers/sessions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,6 @@ class SessionsControllerTest < ActionController::TestCase
assert_redirected_to '/'
end

test '#callback should have a success flash message' do
mock_shopify_omniauth

get :callback, params: { shop: 'shop' }
assert_equal flash[:notice], 'Logged In'
end

test '#callback should have a success flash message in Spanish' do
I18n.locale = :es
mock_shopify_omniauth

get :callback, params: { shop: 'shop' }
assert_equal flash[:notice], 'Has iniciado sesión'
end

test '#callback should flash error when omniauth is not present' do
get :callback, params: { shop: 'shop' }
assert_equal flash[:error], 'Could not log in to Shopify store'
Expand Down