diff options
Diffstat (limited to 'spec/views/errors/omniauth_error.html.haml_spec.rb')
-rw-r--r-- | spec/views/errors/omniauth_error.html.haml_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/views/errors/omniauth_error.html.haml_spec.rb b/spec/views/errors/omniauth_error.html.haml_spec.rb new file mode 100644 index 00000000000..e99cb536bd8 --- /dev/null +++ b/spec/views/errors/omniauth_error.html.haml_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'errors/omniauth_error' do + let(:provider) { FFaker::Product.brand } + let(:error) { FFaker::Lorem.sentence } + + before do + assign(:provider, provider) + assign(:error, error) + end + + it 'renders template' do + render + + expect(rendered).to have_content(provider) + expect(rendered).to have_content(_('Sign-in failed because %{error}.') % { error: error }) + expect(rendered).to have_link('Sign in') + expect(rendered).to have_content(_('If none of the options work, try contacting a GitLab administrator.')) + end +end |