[GraphQL]: test unauthorized mutation
This commit is contained in:
parent
3db741b6b6
commit
f0ac01bf19
1 changed files with 21 additions and 0 deletions
|
@ -263,5 +263,26 @@ describe API::V2::GraphqlController do
|
|||
expect(gql_errors).not_to eq(nil)
|
||||
end
|
||||
end
|
||||
|
||||
context "mutation" do
|
||||
let(:query) do
|
||||
"mutation {
|
||||
dossierEnvoyerMessage(input: {
|
||||
dossierId: \"#{dossier.to_typed_id}\",
|
||||
instructeurId: \"#{instructeur.to_typed_id}\",
|
||||
body: \"Bonjour\"
|
||||
}) {
|
||||
message {
|
||||
body
|
||||
}
|
||||
}
|
||||
}"
|
||||
end
|
||||
|
||||
it "should return error" do
|
||||
expect(gql_data[:dossierEnvoyerMessage]).to eq(nil)
|
||||
expect(gql_errors).not_to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue