Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Buijs <abuijs@gitlab.com>2019-08-15 00:33:39 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-15 00:33:39 +0300
commit0c526db57e40fa440f331d6dff1f67172e3e1cad (patch)
tree30e46618ed162b0f55a7687ac43ab2caa9ca1b0d /spec/helpers
parente9a424a21422264ab525dae0c1df001ff2d8dd9c (diff)
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.rb17
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