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/graphql/resolvers/user_notes_count_resolver_spec.rb')
-rw-r--r--spec/graphql/resolvers/user_notes_count_resolver_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/graphql/resolvers/user_notes_count_resolver_spec.rb b/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
index b3368d532b2..810dfc9c324 100644
--- a/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
+++ b/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
@@ -27,6 +27,14 @@ RSpec.describe Resolvers::UserNotesCountResolver do
it 'returns the number of non-system notes for the issue' do
expect(subject).to eq(2)
end
+
+ context 'when not logged in' do
+ let(:user) { nil }
+
+ it 'returns the number of non-system notes for the issue' do
+ expect(subject).to eq(2)
+ end
+ end
end
context 'when a user has permission to view notes' do
@@ -65,6 +73,14 @@ RSpec.describe Resolvers::UserNotesCountResolver do
it 'returns the number of non-system notes for the merge request' do
expect(subject).to eq(2)
end
+
+ context 'when not logged in' do
+ let(:user) { nil }
+
+ it 'returns the number of non-system notes for the merge request' do
+ expect(subject).to eq(2)
+ end
+ end
end
context 'when a user has permission to view notes' do