Skip to content

Commit

Permalink
Remove recovery code flash message from profile (#1166)
Browse files Browse the repository at this point in the history
* Remove recovery code flash msg from profile

**Why**: This particular message should only display on the personal key page.

* Update test

**Why**: Update flash message
  • Loading branch information
hursey013 authored and amoose committed Mar 8, 2017
1 parent 7ce2463 commit e53d67d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users/recovery_codes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def show
@code = create_new_code
analytics.track_event(Analytics::PROFILE_RECOVERY_CODE_CREATE)

flash[:success] = t('notices.send_code.recovery_code') if params[:resend].present?
flash.now[:success] = t('notices.send_code.recovery_code') if params[:resend].present?
render '/sign_up/recovery_codes/show'
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/users/recovery_codes_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
expect(flash[:sucess]).to be_nil

get :show, resend: true
expect(flash[:success]).to eq t('notices.send_code.recovery_code')
expect(flash.now[:success]).to eq t('notices.send_code.recovery_code')
end
end

Expand Down

0 comments on commit e53d67d

Please sign in to comment.