diff --git a/spec/controllers/admin/manager_invitations_controller_spec.rb b/spec/controllers/admin/manager_invitations_controller_spec.rb index daffc3d98e..0809d40399 100644 --- a/spec/controllers/admin/manager_invitations_controller_spec.rb +++ b/spec/controllers/admin/manager_invitations_controller_spec.rb @@ -23,7 +23,7 @@ module Admin spree_post :create, email: existing_user.email, enterprise_id: enterprise.id expect(response.status).to eq 422 - expect(json_response['errors']).to eq I18n.t('admin.enterprises.invite_manager.user_already_exists') + expect(json_response['errors']).to eq 'User already exists' end end diff --git a/spec/controllers/admin/order_cycles_controller_spec.rb b/spec/controllers/admin/order_cycles_controller_spec.rb index e31ab5a0f4..cacb8e1d4a 100644 --- a/spec/controllers/admin/order_cycles_controller_spec.rb +++ b/spec/controllers/admin/order_cycles_controller_spec.rb @@ -341,7 +341,7 @@ module Admin spree_put :bulk_update, format: :json end.to change(oc, :orders_open_at).by(0) json_response = JSON.parse(response.body) - expect(json_response['errors']).to eq I18n.t('admin.order_cycles.bulk_update.no_data') + expect(json_response['errors']).to eq 'Hm, something went wrong. No order cycle data found.' end context "when a validation error occurs" do @@ -425,7 +425,7 @@ module Admin it "displays an error message when we attempt to delete it" do get :destroy, params: { id: oc.id } expect(response).to redirect_to admin_order_cycles_path - expect(flash[:error]).to eq I18n.t('admin.order_cycles.destroy_errors.orders_present') + expect(flash[:error]).to eq 'That order cycle has been selected by a customer and cannot be deleted. To prevent customers from accessing it, please close it instead.' end end @@ -435,7 +435,7 @@ module Admin it "displays an error message when we attempt to delete it" do get :destroy, params: { id: oc.id } expect(response).to redirect_to admin_order_cycles_path - expect(flash[:error]).to eq I18n.t('admin.order_cycles.destroy_errors.schedule_present') + expect(flash[:error]).to eq 'That order cycle is linked to a schedule and cannot be deleted. Please unlink or delete the schedule first.' end end diff --git a/spec/controllers/admin/schedules_controller_spec.rb b/spec/controllers/admin/schedules_controller_spec.rb index e6536cf0ea..75fb5eea72 100644 --- a/spec/controllers/admin/schedules_controller_spec.rb +++ b/spec/controllers/admin/schedules_controller_spec.rb @@ -255,7 +255,7 @@ describe Admin::SchedulesController, type: :controller do it "returns an error message and prevents me from deleting the schedule" do expect { spree_delete :destroy, params }.to_not change(Schedule, :count) json_response = JSON.parse(response.body) - expect(json_response["errors"]).to include I18n.t('admin.schedules.destroy.associated_subscriptions_error') + expect(json_response["errors"]).to include 'This schedule cannot be deleted because it has associated subscriptions' end end end diff --git a/spec/controllers/admin/subscriptions_controller_spec.rb b/spec/controllers/admin/subscriptions_controller_spec.rb index 8ca50fdacf..1f7a1055a0 100644 --- a/spec/controllers/admin/subscriptions_controller_spec.rb +++ b/spec/controllers/admin/subscriptions_controller_spec.rb @@ -463,7 +463,7 @@ describe Admin::SubscriptionsController, type: :controller do spree_put :cancel, params expect(response.status).to be 409 json_response = JSON.parse(response.body) - expect(json_response['errors']['open_orders']).to eq I18n.t('admin.subscriptions.confirm_cancel_open_orders_msg') + expect(json_response['errors']['open_orders']).to eq 'Some orders for this subscription are currently open. The customer has already been notified that the order will be placed. Would you like to cancel these order(s) or keep them?' end end @@ -564,7 +564,7 @@ describe Admin::SubscriptionsController, type: :controller do spree_put :pause, params expect(response.status).to be 409 json_response = JSON.parse(response.body) - expect(json_response['errors']['open_orders']).to eq I18n.t('admin.subscriptions.confirm_cancel_open_orders_msg') + expect(json_response['errors']['open_orders']).to eq 'Some orders for this subscription are currently open. The customer has already been notified that the order will be placed. Would you like to cancel these order(s) or keep them?' end end @@ -685,7 +685,7 @@ describe Admin::SubscriptionsController, type: :controller do spree_put :unpause, params expect(response.status).to be 409 json_response = JSON.parse(response.body) - expect(json_response['errors']['canceled_orders']).to eq I18n.t('admin.subscriptions.resume_canceled_orders_msg') + expect(json_response['errors']['canceled_orders']).to eq 'Some orders for this subscription can be resumed right now. You can resume them from the orders dropdown.' end end diff --git a/spec/controllers/admin/terms_of_service_files_controller_spec.rb b/spec/controllers/admin/terms_of_service_files_controller_spec.rb index 280a85ded1..2a81cc898b 100644 --- a/spec/controllers/admin/terms_of_service_files_controller_spec.rb +++ b/spec/controllers/admin/terms_of_service_files_controller_spec.rb @@ -32,7 +32,7 @@ describe Admin::TermsOfServiceFilesController, type: :controller do it "redirects and show an error" do post :create, params: {} expect(response).to redirect_to admin_terms_of_service_files_path - expect(flash[:error]).to eq I18n.t(".admin.terms_of_service_files.create.select_file") + expect(flash[:error]).to eq 'Please select a file first.' end end