diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 15:09:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 15:09:01 +0000 |
commit | b304a72312465ed4c0a568ee6a6ea5e97f705c9b (patch) | |
tree | a2f25dbea26c81e88b169c55a6275e3969323e82 /spec/requests/api/graphql | |
parent | b84eeb256c4a780d902faee1f99ca9a711b3214a (diff) | |
download | gitlab-ce-b304a72312465ed4c0a568ee6a6ea5e97f705c9b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/graphql')
8 files changed, 13 insertions, 13 deletions
diff --git a/spec/requests/api/graphql/current_user_query_spec.rb b/spec/requests/api/graphql/current_user_query_spec.rb index 9db638ea59e..2b38b8e98ab 100644 --- a/spec/requests/api/graphql/current_user_query_spec.rb +++ b/spec/requests/api/graphql/current_user_query_spec.rb @@ -16,7 +16,7 @@ describe 'getting project information' do end context 'when there is a current_user' do - set(:current_user) { create(:user) } + let_it_be(:current_user) { create(:user) } it_behaves_like 'a working graphql query' diff --git a/spec/requests/api/graphql/gitlab_schema_spec.rb b/spec/requests/api/graphql/gitlab_schema_spec.rb index e10f0732852..8d020cd3a4e 100644 --- a/spec/requests/api/graphql/gitlab_schema_spec.rb +++ b/spec/requests/api/graphql/gitlab_schema_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe 'GitlabSchema configurations' do include GraphqlHelpers - set(:project) { create(:project) } + let_it_be(:project) { create(:project) } shared_examples 'imposing query limits' do describe 'timeouts' do diff --git a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb index b24981873c8..3fdeccc84f9 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' describe 'Adding an AwardEmoji' do include GraphqlHelpers - set(:current_user) { create(:user) } - set(:project) { create(:project) } - set(:awardable) { create(:note, project: project) } + let_it_be(:current_user) { create(:user) } + let_it_be(:project) { create(:project) } + let_it_be(:awardable) { create(:note, project: project) } let(:emoji_name) { 'thumbsup' } let(:mutation) do variables = { diff --git a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb index 5e2c0e668a5..bc796b34db4 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' describe 'Toggling an AwardEmoji' do include GraphqlHelpers - set(:current_user) { create(:user) } - set(:project) { create(:project) } - set(:awardable) { create(:note, project: project) } + let_it_be(:current_user) { create(:user) } + let_it_be(:project, reload: true) { create(:project) } + let_it_be(:awardable) { create(:note, project: project) } let(:emoji_name) { 'thumbsup' } let(:mutation) do variables = { diff --git a/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb index b04fcb9aece..4c535434faa 100644 --- a/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe 'Adding a DiffNote' do include GraphqlHelpers - set(:current_user) { create(:user) } + let_it_be(:current_user) { create(:user) } let(:noteable) { create(:merge_request, source_project: project, target_project: project) } let(:project) { create(:project, :repository) } let(:diff_refs) { noteable.diff_refs } diff --git a/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb index 3ba6c689024..0bba3e79434 100644 --- a/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe 'Adding an image DiffNote' do include GraphqlHelpers - set(:current_user) { create(:user) } + let_it_be(:current_user) { create(:user) } let(:noteable) { create(:merge_request, source_project: project, target_project: project) } let(:project) { create(:project, :repository) } let(:diff_refs) { noteable.diff_refs } diff --git a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb index 14aaa430ac9..9a78d44245e 100644 --- a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe 'Adding a Note' do include GraphqlHelpers - set(:current_user) { create(:user) } + let_it_be(:current_user) { create(:user) } let(:noteable) { create(:merge_request, source_project: project, target_project: project) } let(:project) { create(:project) } let(:discussion) { nil } diff --git a/spec/requests/api/graphql/tasks/task_completion_status_spec.rb b/spec/requests/api/graphql/tasks/task_completion_status_spec.rb index 566d0fe636a..188bfa8b924 100644 --- a/spec/requests/api/graphql/tasks/task_completion_status_spec.rb +++ b/spec/requests/api/graphql/tasks/task_completion_status_spec.rb @@ -9,8 +9,8 @@ describe 'getting task completion status information' do DESCRIPTION_1_DONE = '- [x] task 1\n- [ ] task 2' DESCRIPTION_2_DONE = '- [x] task 1\n- [x] task 2' - set(:user1) { create(:user) } - set(:project) { create(:project, :repository, :public) } + let_it_be(:user1) { create(:user) } + let_it_be(:project) { create(:project, :repository, :public) } let(:fields) do <<~QUERY |