diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/lib/learn_gitlab/project_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/lib/learn_gitlab/project_spec.rb')
-rw-r--r-- | spec/lib/learn_gitlab/project_spec.rb | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/spec/lib/learn_gitlab/project_spec.rb b/spec/lib/learn_gitlab/project_spec.rb deleted file mode 100644 index 23784709817..00000000000 --- a/spec/lib/learn_gitlab/project_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe LearnGitlab::Project do - let_it_be(:current_user) { create(:user) } - let_it_be(:learn_gitlab_project) { create(:project, name: LearnGitlab::Project::PROJECT_NAME) } - let_it_be(:learn_gitlab_board) { create(:board, project: learn_gitlab_project, name: LearnGitlab::Project::BOARD_NAME) } - let_it_be(:learn_gitlab_label) { create(:label, project: learn_gitlab_project, name: LearnGitlab::Project::LABEL_NAME) } - - before do - learn_gitlab_project.add_developer(current_user) - end - - describe '.available?' do - using RSpec::Parameterized::TableSyntax - - where(:project, :board, :label, :expected_result) do - nil | nil | nil | nil - nil | nil | true | nil - nil | true | nil | nil - nil | true | true | nil - true | nil | nil | nil - true | nil | true | nil - true | true | nil | nil - true | true | true | true - end - - with_them do - before do - allow_next_instance_of(described_class) do |learn_gitlab| - allow(learn_gitlab).to receive(:project).and_return(project) - allow(learn_gitlab).to receive(:board).and_return(board) - allow(learn_gitlab).to receive(:label).and_return(label) - end - end - - subject { described_class.new(current_user).available? } - - it { is_expected.to be expected_result } - end - end - - describe '.project' do - subject { described_class.new(current_user).project } - - it { is_expected.to eq learn_gitlab_project } - - context 'when it is created during trial signup' do - let_it_be(:learn_gitlab_project) { create(:project, name: LearnGitlab::Project::PROJECT_NAME_ULTIMATE_TRIAL, path: 'learn-gitlab-ultimate-trial') } - - it { is_expected.to eq learn_gitlab_project } - end - end - - describe '.board' do - subject { described_class.new(current_user).board } - - it { is_expected.to eq learn_gitlab_board } - end - - describe '.label' do - subject { described_class.new(current_user).label } - - it { is_expected.to eq learn_gitlab_label } - end -end |