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

almost_there.html.haml_spec.rb « confirmations « devise « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c091efe92957c64e0f8fdc8a66414a1762de45d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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