gitlab-org--gitlab-foss/spec/helpers/sessions_helper_spec.rb
Alex Buijs 0c526db57e 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
2019-08-14 21:33:39 +00:00

17 lines
548 B
Ruby

# 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