summaryrefslogtreecommitdiff
path: root/spec/views/projects/edit.html.haml_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/projects/edit.html.haml_spec.rb')
-rw-r--r--spec/views/projects/edit.html.haml_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb
index 60f4c1664f7..8c96f286c79 100644
--- a/spec/views/projects/edit.html.haml_spec.rb
+++ b/spec/views/projects/edit.html.haml_spec.rb
@@ -92,6 +92,22 @@ RSpec.describe 'projects/edit' do
end
end
+ context 'squash template' do
+ it 'displays a placeholder if none is set' do
+ render
+
+ expect(rendered).to have_field('project[squash_commit_template]', placeholder: '%{title}')
+ end
+
+ it 'displays the user entered value' do
+ project.update!(squash_commit_template: '%{first_multiline_commit}')
+
+ render
+
+ expect(rendered).to have_field('project[squash_commit_template]', with: '%{first_multiline_commit}')
+ end
+ end
+
context 'forking' do
before do
assign(:project, project)