2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe SessionsHelper do
|
2019-10-12 21:52:04 +05:30
|
|
|
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
|