Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb b/spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb
index 7fd54408b11..2d7da9f9f00 100644
--- a/spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb
+++ b/spec/support/shared_examples/graphql/types/gitlab_style_deprecations_shared_examples.rb
@@ -69,4 +69,21 @@ RSpec.shared_examples 'Gitlab-style deprecations' do
'This feature is in Alpha. It can be changed or removed at any time. Introduced in 1.10.'
)
end
+
+ it 'supports :alpha' do
+ deprecable = subject(alpha: { milestone: '1.10' })
+
+ expect(deprecable.deprecation_reason).to eq(
+ 'This feature is in Alpha. It can be changed or removed at any time. Introduced in 1.10.'
+ )
+ end
+
+ it 'does not allow :alpha and :deprecated together' do
+ expect do
+ subject(alpha: { milestone: '1.10' }, deprecated: { milestone: '1.10', reason: 'my reason' } )
+ end.to raise_error(
+ ArgumentError,
+ eq("`alpha` and `deprecated` arguments cannot be passed at the same time")
+ )
+ end
end