From b304a72312465ed4c0a568ee6a6ea5e97f705c9b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 17 Feb 2020 15:09:01 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/requests/api/snippets_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/requests/api/snippets_spec.rb') diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb index 1749ec89bc1..21565265b99 100644 --- a/spec/requests/api/snippets_spec.rb +++ b/spec/requests/api/snippets_spec.rb @@ -89,8 +89,8 @@ describe API::Snippets do end describe 'GET /snippets/:id/raw' do - set(:author) { create(:user) } - set(:snippet) { create(:personal_snippet, :private, author: author) } + let_it_be(:author) { create(:user) } + let_it_be(:snippet) { create(:personal_snippet, :private, author: author) } it 'requires authentication' do get api("/snippets/#{snippet.id}", nil) @@ -137,10 +137,10 @@ describe API::Snippets do end describe 'GET /snippets/:id' do - set(:admin) { create(:user, :admin) } - set(:author) { create(:user) } - set(:private_snippet) { create(:personal_snippet, :private, author: author) } - set(:internal_snippet) { create(:personal_snippet, :internal, author: author) } + let_it_be(:admin) { create(:user, :admin) } + let_it_be(:author) { create(:user) } + let_it_be(:private_snippet) { create(:personal_snippet, :private, author: author) } + let_it_be(:internal_snippet) { create(:personal_snippet, :internal, author: author) } it 'requires authentication' do get api("/snippets/#{private_snippet.id}", nil) -- cgit v1.2.1