summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb b/spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb
new file mode 100644
index 00000000000..9914de7c847
--- /dev/null
+++ b/spec/support/shared_examples/graphql/container_expiration_policy_shared_examples.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+RSpec.shared_examples 'exposing container expiration policy option' do |model_option|
+ it 'exposes all options' do
+ expect(described_class.values.keys).to contain_exactly(*expected_values)
+ end
+
+ it 'uses all possible options from model' do
+ all_options = ContainerExpirationPolicy.public_send("#{model_option}_options").keys
+ expect(described_class::OPTIONS_MAPPING.keys).to contain_exactly(*all_options)
+ end
+end