diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 00:08:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 00:08:09 +0000 |
commit | 6348b76e4b4dd4e398915c3150c1d02aafa3f13b (patch) | |
tree | c8c53d4adac92d4576d73d33ebeeaa62a2626b12 /spec | |
parent | 03a70b84edfb86bc27f9234e1f1d157d3a33c555 (diff) | |
download | gitlab-ce-6348b76e4b4dd4e398915c3150c1d02aafa3f13b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/snippets/user_creates_snippet_spec.rb | 5 | ||||
-rw-r--r-- | spec/services/snippets/create_service_spec.rb | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb index f200355c6d2..93da976dee0 100644 --- a/spec/features/snippets/user_creates_snippet_spec.rb +++ b/spec/features/snippets/user_creates_snippet_spec.rb @@ -99,6 +99,11 @@ shared_examples_for 'snippet editor' do it 'renders new page' do expect(page).to have_content('New Snippet') end + + it 'has the correct action path' do + action = find('form.snippet-form')['action'] + expect(action).to match(%r{/snippets\z}) + end end it 'validation fails for the first time' do diff --git a/spec/services/snippets/create_service_spec.rb b/spec/services/snippets/create_service_spec.rb index 4cf574ed567..8c91763cc48 100644 --- a/spec/services/snippets/create_service_spec.rb +++ b/spec/services/snippets/create_service_spec.rb @@ -172,6 +172,10 @@ describe Snippets::CreateService do it 'returns the error' do expect(snippet.errors.full_messages).to include('Repository could not be created') end + + it 'does not return a snippet with an id' do + expect(snippet.id).to be_nil + end end context 'when the commit action fails' do |