summaryrefslogtreecommitdiff
path: root/spec/controllers/snippets_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 03:06:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 03:06:21 +0000
commit7bb7a8d529fd1155a35a2e9e9cdddd7953f3776d (patch)
treee0cedf3ea8732ab14cd918242279619c3c7d7072 /spec/controllers/snippets_controller_spec.rb
parent504ab1e32cbd3a529fe61f6c9a30823febce796c (diff)
downloadgitlab-ce-7bb7a8d529fd1155a35a2e9e9cdddd7953f3776d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/snippets_controller_spec.rb')
-rw-r--r--spec/controllers/snippets_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/snippets_controller_spec.rb b/spec/controllers/snippets_controller_spec.rb
index 1b3a8965342..e892c736c69 100644
--- a/spec/controllers/snippets_controller_spec.rb
+++ b/spec/controllers/snippets_controller_spec.rb
@@ -269,7 +269,7 @@ describe SnippetsController do
it 'creates a spam log' do
expect { create_snippet(visibility_level: Snippet::PUBLIC) }
- .to change { SpamLog.count }.by(1)
+ .to log_spam(title: 'Title', user: user, noteable_type: 'PersonalSnippet')
end
it 'renders :new with recaptcha disabled' do
@@ -345,7 +345,7 @@ describe SnippetsController do
it 'creates a spam log' do
expect { update_snippet(title: 'Foo', visibility_level: Snippet::PUBLIC) }
- .to change { SpamLog.count }.by(1)
+ .to log_spam(title: 'Foo', user: user, noteable_type: 'PersonalSnippet')
end
it 'renders :edit with recaptcha disabled' do
@@ -389,8 +389,8 @@ describe SnippetsController do
end
it 'creates a spam log' do
- expect { update_snippet(title: 'Foo') }
- .to change { SpamLog.count }.by(1)
+ expect {update_snippet(title: 'Foo') }
+ .to log_spam(title: 'Foo', user: user, noteable_type: 'PersonalSnippet')
end
it 'renders :edit with recaptcha disabled' do