Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
51d6e924
Commit
51d6e924
authored
Jul 10, 2019
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for GraphQL note creation for Epics
https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
parent
a8d91819
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb
.../requests/api/graphql/mutations/notes/create/note_spec.rb
+38
-0
No files found.
ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb
0 → 100644
View file @
51d6e924
# frozen_string_literal: true
require
'spec_helper'
describe
'Adding a Note to an Epic'
do
include
GraphqlHelpers
set
(
:current_user
)
{
create
(
:user
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:mutation
)
do
variables
=
{
noteable_id:
GitlabSchema
.
id_from_object
(
epic
).
to_s
,
body:
'Body text'
}
graphql_mutation
(
:create_note
,
variables
)
end
def
mutation_response
graphql_mutation_response
(
:create_note
)
end
before
do
stub_licensed_features
(
epics:
true
)
end
context
'when the user does not have permission'
do
let
(
:group
)
{
create
(
:group
,
:private
)
}
it_behaves_like
'a Note mutation when the user does not have permission'
end
context
'when the user has permission'
do
let
(
:group
)
{
create
(
:group
,
:public
)
}
it_behaves_like
'a Note mutation that creates a Note'
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment