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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-28 06:07:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-28 06:07:37 +0300
commit9d01bd9d462eccffda96e5dcc1caeb8b86e0efe8 (patch)
tree5abfcc26e481c64e31d5d24d155297d55bd7399a /spec/views
parent6595942399485190be21c6407c446ebabe020ec6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/devise/sessions/new.html.haml_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/views/devise/sessions/new.html.haml_spec.rb b/spec/views/devise/sessions/new.html.haml_spec.rb
index b5c69f4f04d..d3552bf2e5a 100644
--- a/spec/views/devise/sessions/new.html.haml_spec.rb
+++ b/spec/views/devise/sessions/new.html.haml_spec.rb
@@ -3,6 +3,32 @@
require 'spec_helper'
RSpec.describe 'devise/sessions/new' do
+ describe 'marketing text' do
+ subject { render(template: 'devise/sessions/new', layout: 'layouts/devise') }
+
+ before do
+ stub_devise
+ disable_captcha
+ allow(Gitlab).to receive(:dev_env_or_com?).and_return(true)
+ end
+
+ it 'when flash is anything it renders marketing text' do
+ flash[:notice] = "You can't do that"
+
+ subject
+
+ expect(rendered).to have_content('A complete DevOps platform')
+ end
+
+ it 'when flash notice is devise confirmed message it hides marketing text' do
+ flash[:notice] = t(:confirmed, scope: [:devise, :confirmations])
+
+ subject
+
+ expect(rendered).not_to have_content('A complete DevOps platform')
+ end
+ end
+
describe 'ldap' do
include LdapHelpers