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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 03:08:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 03:08:09 +0300
commit6348b76e4b4dd4e398915c3150c1d02aafa3f13b (patch)
treec8c53d4adac92d4576d73d33ebeeaa62a2626b12 /spec
parent03a70b84edfb86bc27f9234e1f1d157d3a33c555 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/features/snippets/user_creates_snippet_spec.rb5
-rw-r--r--spec/services/snippets/create_service_spec.rb4
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