diff options
author | Alex Buijs <abuijs@gitlab.com> | 2019-08-14 21:33:39 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-14 21:33:39 +0000 |
commit | 0c526db57e40fa440f331d6dff1f67172e3e1cad (patch) | |
tree | 30e46618ed162b0f55a7687ac43ab2caa9ca1b0d /spec/helpers | |
parent | e9a424a21422264ab525dae0c1df001ff2d8dd9c (diff) | |
download | gitlab-ce-0c526db57e40fa440f331d6dff1f67172e3e1cad.tar.gz |
Add link to resend confirmation email
This link is shown when a user tries to login with an unconfirmed
email address and the grace period has expired
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/sessions_helper_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/helpers/sessions_helper_spec.rb b/spec/helpers/sessions_helper_spec.rb new file mode 100644 index 00000000000..647771ace92 --- /dev/null +++ b/spec/helpers/sessions_helper_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe SessionsHelper do + describe '#unconfirmed_email?' do + it 'returns true when the flash alert contains a devise failure unconfirmed message' do + flash[:alert] = t(:unconfirmed, scope: [:devise, :failure]) + expect(helper.unconfirmed_email?).to be_truthy + end + + it 'returns false when the flash alert does not contain a devise failure unconfirmed message' do + flash[:alert] = 'something else' + expect(helper.unconfirmed_email?).to be_falsey + end + end +end |