diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-13 12:09:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-13 12:09:54 +0000 |
commit | affec3ced2d85697d9a21d83e811285b030705f2 (patch) | |
tree | db315bff6a2e4a2f3db1509eb573c082b046a320 /spec/support/shared_examples/services/feature_flags | |
parent | 152d3b652dd7daad10b3056f47e579acf601546d (diff) | |
download | gitlab-ce-affec3ced2d85697d9a21d83e811285b030705f2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/services/feature_flags')
-rw-r--r-- | spec/support/shared_examples/services/feature_flags/client_shared_examples.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/support/shared_examples/services/feature_flags/client_shared_examples.rb b/spec/support/shared_examples/services/feature_flags/client_shared_examples.rb new file mode 100644 index 00000000000..a62cffc0e1b --- /dev/null +++ b/spec/support/shared_examples/services/feature_flags/client_shared_examples.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +shared_examples_for 'update feature flag client' do + let!(:client) { create(:operations_feature_flags_client, project: project) } + + it 'updates last feature flag updated at' do + freeze_time do + expect { subject }.to change { client.reload.last_feature_flag_updated_at }.from(nil).to(Time.current) + end + end +end + +shared_examples_for 'does not update feature flag client' do + let!(:client) { create(:operations_feature_flags_client, project: project) } + + it 'does not update last feature flag updated at' do + expect { subject }.not_to change { client.reload.last_feature_flag_updated_at } + end +end |