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>2020-01-13 15:08:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-13 15:08:04 +0300
commiteb30dd6e28f6fc9eb8021d205f6ed84511f001e2 (patch)
tree9557e4782c762f4d08f57c9e04991bf988695085 /spec/views
parentc3ad57034cc1cbd6d0ad02de7ac57f6004440c83 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/edit.html.haml_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb
index 8005b549838..e95dec56a2d 100644
--- a/spec/views/projects/edit.html.haml_spec.rb
+++ b/spec/views/projects/edit.html.haml_spec.rb
@@ -28,6 +28,33 @@ describe 'projects/edit' do
end
end
+ context 'merge suggestions settings' do
+ it 'displays all possible variables' do
+ render
+
+ expect(rendered).to have_content('%{project_path}')
+ expect(rendered).to have_content('%{project_name}')
+ expect(rendered).to have_content('%{file_path}')
+ expect(rendered).to have_content('%{branch_name}')
+ expect(rendered).to have_content('%{username}')
+ expect(rendered).to have_content('%{user_full_name}')
+ end
+
+ it 'displays a placeholder if none is set' do
+ render
+
+ expect(rendered).to have_field('project[suggestion_commit_message]', placeholder: 'Apply suggestion to %{file_path}')
+ end
+
+ it 'displays the user entered value' do
+ project.update!(suggestion_commit_message: 'refactor: changed %{file_path}')
+
+ render
+
+ expect(rendered).to have_field('project[suggestion_commit_message]', with: 'refactor: changed %{file_path}')
+ end
+ end
+
context 'forking' do
before do
assign(:project, project)