diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-06 03:22:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-06 03:22:21 +0300 |
commit | e622d769cea776ed0ba88321a87bcd3b8a359a4d (patch) | |
tree | 8de73104658f8e963381f94cce9f77d2d48f8619 /spec/models | |
parent | 6fd670b99b45d3374f8b429e87be51dd67d6ab39 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/onboarding/completion_spec.rb | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/spec/models/onboarding/completion_spec.rb b/spec/models/onboarding/completion_spec.rb index dd7648f7799..b9c9b994736 100644 --- a/spec/models/onboarding/completion_spec.rb +++ b/spec/models/onboarding/completion_spec.rb @@ -42,43 +42,19 @@ RSpec.describe Onboarding::Completion, feature_category: :onboarding do describe '#completed?' do subject(:completed?) { described_class.new(project).completed?(column) } - context 'when code_added' do - let(:column) { :code_added } + let(:column) { :code_added_at } + let(:completed_actions) { { code_added_at: code_added_at_timestamp } } - context 'when commit_count > 1' do - let(:project) { build(:project, :stubbed_commit_count, namespace: namespace) } + context 'when the action has been completed' do + let(:code_added_at_timestamp) { Time.current } - it { is_expected.to eq(true) } - end - - context 'when branch_count > 1' do - let(:project) { build(:project, :stubbed_branch_count, namespace: namespace) } - - it { is_expected.to eq(true) } - end - - context 'when empty repository' do - let(:project) { build(:project, namespace: namespace) } - - it { is_expected.to eq(false) } - end + it { is_expected.to eq(true) } end - context 'when secure_dast_run' do - let(:column) { :secure_dast_run_at } - let(:completed_actions) { { secure_dast_run_at: secure_dast_run_at } } - - context 'when is completed' do - let(:secure_dast_run_at) { Time.current } - - it { is_expected.to eq(true) } - end - - context 'when is not completed' do - let(:secure_dast_run_at) { nil } + context 'when the action has not been completed' do + let(:code_added_at_timestamp) { nil } - it { is_expected.to eq(false) } - end + it { is_expected.to eq(false) } end end end |