diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 03:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 03:08:01 +0300 |
commit | 1caa60060b2f9e3417ab335e2f1dea1064163434 (patch) | |
tree | 01c0d5825bd345ee625bb70b7433c6e10307fcce /spec/models/project_spec.rb | |
parent | 7f8330873c1a5860b8a9a52d111083a65d210249 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 99d7e4d156f..e66f37f2eec 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -165,6 +165,7 @@ describe Project do let(:project) { create(:project, :public) } let(:requester) { create(:user) } let(:developer) { create(:user) } + before do project.request_access(requester) project.add_developer(developer) @@ -815,6 +816,7 @@ describe Project do context 'with external issues tracker' do let!(:internal_issue) { create(:issue, project: project) } + before do allow(project).to receive(:external_issue_tracker).and_return(true) end @@ -2334,6 +2336,7 @@ describe Project do describe '#has_remote_mirror?' do let(:project) { create(:project, :remote_mirror, :import_started) } + subject { project.has_remote_mirror? } before do @@ -2353,6 +2356,7 @@ describe Project do describe '#update_remote_mirrors' do let(:project) { create(:project, :remote_mirror, :import_started) } + delegate :update_remote_mirrors, to: :project before do @@ -3460,6 +3464,7 @@ describe Project do describe '#pipeline_status' do let(:project) { create(:project, :repository) } + it 'builds a pipeline status' do expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectPipelineStatus) end @@ -4638,6 +4643,7 @@ describe Project do describe '#execute_hooks' do let(:data) { { ref: 'refs/heads/master', data: 'data' } } + it 'executes active projects hooks with the specified scope' do hook = create(:project_hook, merge_requests_events: false, push_events: true) expect(ProjectHook).to receive(:select_active) @@ -4968,6 +4974,7 @@ describe Project do context 'when there is a gitlab deploy token associated but is has been revoked' do let!(:deploy_token) { create(:deploy_token, :gitlab_deploy_token, :revoked, projects: [project]) } + it { is_expected.to be_nil } end @@ -5011,6 +5018,7 @@ describe Project do context '#members_among' do let(:users) { create_list(:user, 3) } + set(:group) { create(:group) } set(:project) { create(:project, namespace: group) } |