diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-10 21:12:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-10 21:12:05 +0300 |
commit | 2e2c1a521c03c8cd7ab57296016fee6350e29b07 (patch) | |
tree | 26df83cd7566a6230d5218c446a213f02313314d /spec/frontend/fixtures/issues.rb | |
parent | 0a412bceb98cd7acd46701d75dbad9683cb33baf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures/issues.rb')
-rw-r--r-- | spec/frontend/fixtures/issues.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/issues.rb b/spec/frontend/fixtures/issues.rb index 8bedb802242..0c2799d2259 100644 --- a/spec/frontend/fixtures/issues.rb +++ b/spec/frontend/fixtures/issues.rb @@ -106,3 +106,41 @@ RSpec.describe API::Issues, '(JavaScript fixtures)', type: :request do expect(response).to be_successful end end + +RSpec.describe GraphQL::Query, type: :request do + include ApiHelpers + include GraphqlHelpers + include JavaScriptFixturesHelpers + + let_it_be(:user) { create(:user) } + let_it_be(:project) { create(:project) } + + before_all do + project.add_reporter(user) + end + + issue_popover_query_path = 'issuable/popover/queries/issue.query.graphql' + + it "graphql/#{issue_popover_query_path}.json" do + query = get_graphql_query_as_string(issue_popover_query_path, ee: Gitlab.ee?) + + issue = create( + :issue, + project: project, + confidential: true, + created_at: Time.parse('2020-07-01T04:08:01Z'), + due_date: Date.new(2020, 7, 5), + milestone: create( + :milestone, + project: project, + title: '15.2', + start_date: Date.new(2020, 7, 1), + due_date: Date.new(2020, 7, 30) + ) + ) + + post_graphql(query, current_user: user, variables: { projectPath: project.full_path, iid: issue.iid.to_s }) + + expect_graphql_errors_to_be_empty + end +end |