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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 18:09:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 18:09:43 +0300
commit15714832c817685512f2ea1f2d91a94cb1cf67b9 (patch)
treee49977a709bba2a83cd30b92ea5578e1a99ba9ca /spec/requests/projects
parent213bd7e9d3d071e88f342511bdc48905b9d7e39c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/projects')
-rw-r--r--spec/requests/projects/noteable_notes_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/requests/projects/noteable_notes_spec.rb b/spec/requests/projects/noteable_notes_spec.rb
index 5ae2aadaa84..2bf1ffb2edc 100644
--- a/spec/requests/projects/noteable_notes_spec.rb
+++ b/spec/requests/projects/noteable_notes_spec.rb
@@ -18,7 +18,9 @@ RSpec.describe 'Project noteable notes' do
login_as(user)
end
- it 'does not set a Gitlab::EtagCaching ETag' do
+ it 'does not set a Gitlab::EtagCaching ETag if there is a note' do
+ create(:note_on_merge_request, noteable: merge_request, project: merge_request.project)
+
get notes_path
expect(response).to have_gitlab_http_status(:ok)
@@ -27,5 +29,12 @@ RSpec.describe 'Project noteable notes' do
# interfere with notes pagination
expect(response_etag).not_to eq(stored_etag)
end
+
+ it 'sets a Gitlab::EtagCaching ETag if there is no note' do
+ get notes_path
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(response_etag).to eq(stored_etag)
+ end
end
end