Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/api/helpers_spec.rb')
-rw-r--r--spec/lib/api/helpers_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/lib/api/helpers_spec.rb b/spec/lib/api/helpers_spec.rb
index 2277bd78e86..b2d4a3094af 100644
--- a/spec/lib/api/helpers_spec.rb
+++ b/spec/lib/api/helpers_spec.rb
@@ -76,6 +76,12 @@ RSpec.describe API::Helpers do
expect(subject.find_project(non_existing_id)).to be_nil
end
end
+
+ context 'when project id is not provided' do
+ it 'returns nil' do
+ expect(subject.find_project(nil)).to be_nil
+ end
+ end
end
context 'when ID is used as an argument' do
@@ -160,7 +166,7 @@ RSpec.describe API::Helpers do
describe '#find_project!' do
let_it_be(:project) { create(:project) }
- let(:user) { project.owner}
+ let(:user) { project.first_owner}
before do
allow(subject).to receive(:current_user).and_return(user)