diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-01 22:41:13 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-01 22:45:38 -0700 |
| commit | bbded5187a97464b610fe4ff305cfc3cf8af936b (patch) | |
| tree | c5e9bb03dec32753f3b0946473ec9ce1b0749151 /spec | |
| parent | a035ea603b16e2f5c393e6b625566f1efadc5bca (diff) | |
hound happy.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/controllers/my/passwords_controller_spec.rb | 3 | ||||
| -rw-r--r-- | spec/features/change_password_spec.rb | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/spec/controllers/my/passwords_controller_spec.rb b/spec/controllers/my/passwords_controller_spec.rb index 776ef957..92262371 100644 --- a/spec/controllers/my/passwords_controller_spec.rb +++ b/spec/controllers/my/passwords_controller_spec.rb @@ -25,7 +25,8 @@ describe My::PasswordsController do end it "displays an error on the page" do - expect(flash[:error]).to eql(I18n.t("my.passwords.passwords_do_not_match")) + error_message = I18n.t("my.passwords.passwords_do_not_match") + expect(flash[:error]).to eql(error_message) end it "renders the show template" do diff --git a/spec/features/change_password_spec.rb b/spec/features/change_password_spec.rb index 3c12e4f0..1ba10715 100644 --- a/spec/features/change_password_spec.rb +++ b/spec/features/change_password_spec.rb @@ -2,20 +2,20 @@ require "rails_helper" describe "changing my password", js: true do context "when changing my password" do - let(:user) { create(:user, :password => "password") } + let(:user) { create(:user, password: "password") } before :each do visit login_path within(".form-inline") do - fill_in("session_username", :with => user.email) - fill_in("session_password", :with => "password") + fill_in("session_username", with: user.email) + fill_in("session_password", with: "password") end click_button("Sign In") visit my_dashboard_path click_link("Account") within(".form-horizontal") do - fill_in("user_password", :with => "mopass") - fill_in("user_password_confirmation", :with => "mopass") + fill_in("user_password", with: "mopass") + fill_in("user_password_confirmation", with: "mopass") end click_button "Update password" end |
