summaryrefslogtreecommitdiff
path: root/spec/graphql/resolvers/environments_resolver_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/resolvers/environments_resolver_spec.rb')
-rw-r--r--spec/graphql/resolvers/environments_resolver_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/graphql/resolvers/environments_resolver_spec.rb b/spec/graphql/resolvers/environments_resolver_spec.rb
index 6c999e5d0e7..9f4c4716de0 100644
--- a/spec/graphql/resolvers/environments_resolver_spec.rb
+++ b/spec/graphql/resolvers/environments_resolver_spec.rb
@@ -46,10 +46,10 @@ RSpec.describe Resolvers::EnvironmentsResolver do
expect(resolve_environments(states: ['available'])).to contain_exactly(environment1, environment3)
end
- it 'returns error if requested state is invalid' do
- expect { resolve_environments(states: ['invalid']) }.to(
- raise_error(Gitlab::Graphql::Errors::ArgumentError)
- )
+ it 'generates an error if requested state is invalid' do
+ expect_graphql_error_to_be_created(Gitlab::Graphql::Errors::ArgumentError) do
+ resolve_environments(states: ['invalid'])
+ end
end
end