summaryrefslogtreecommitdiff
path: root/spec/views/devise
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/devise')
-rw-r--r--spec/views/devise/confirmations/almost_there.html.haml_spec.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/views/devise/confirmations/almost_there.html.haml_spec.rb b/spec/views/devise/confirmations/almost_there.html.haml_spec.rb
new file mode 100644
index 00000000000..c091efe9295
--- /dev/null
+++ b/spec/views/devise/confirmations/almost_there.html.haml_spec.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe 'devise/confirmations/almost_there' do
+ describe 'confirmations text' do
+ subject { render(template: 'devise/confirmations/almost_there') }
+
+ before do
+ allow(view).to receive(:params).and_return(email: email)
+ end
+
+ context 'when correct email' do
+ let(:email) { 'こんにちは@test' }
+
+ specify do
+ subject
+
+ expect(rendered).to have_content(
+ "Please check your email (#{email}) to confirm your account"
+ )
+ end
+ end
+
+ context 'when random text' do
+ let(:email) { 'random text' }
+
+ specify do
+ subject
+
+ expect(rendered).to have_content(
+ 'Please check your email to confirm your account'
+ )
+ end
+ end
+ end
+end