Skip to content

Fix error in spec description

Kerri Miller requested to merge patch-40 into master

What does this MR do?

I spotted this small mistake in the spec description string while working on a community MR. I think it is simply a cut-n-paste error, as the array returned by the API here should NOT be empty (as the expects show)

From: /Users/kerrizor/projects/gitlab/gdk-ee/gitlab/spec/requests/api/notes_spec.rb @ line 98 :

     93:
     94:         context "current user can view the note" do
     95:           it "returns an empty array" do
     96:             get api("/projects/#{ext_proj.id}/issues/#{ext_issue.iid}/notes", private_user)
     97: binding.pry
 =>  98:             expect(response).to have_gitlab_http_status(200)
     99:             expect(response).to include_pagination_headers
    100:             expect(json_response).to be_an Array
    101:             expect(json_response.first['body']).to eq(cross_reference_note.note)
    102:           end
    103:         end

[1] pry(#<RSpec::ExampleGroups::APINotes::WhenNoteableIsAnIssue::WhenReferencingOtherProject::GETProjectsIdNoteableNoteableIdNotes::CurrentUserCanViewTheNote>)> json_response
=> [{"id"=>2,
  "type"=>nil,
  "body"=>"mentioned in issue user3/project3#1",
  "attachment"=>nil,
  "author"=>
   {"id"=>2,
    "name"=>"John Doe3",
    "username"=>"namespace1",
    "state"=>"active",
    "avatar_url"=>"https://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80&d=identicon",
    "web_url"=>"http://localhost/namespace1"},
  "created_at"=>"2019-12-06T00:25:09.599Z",
  "updated_at"=>"2019-12-06T00:25:09.599Z",
  "system"=>true,
  "noteable_id"=>2,
  "noteable_type"=>"Issue",
  "resolvable"=>false,
  "noteable_iid"=>1}]
[2] pry(#<RSpec::ExampleGroups::APINotes::WhenNoteableIsAnIssue::WhenReferencingOtherProject::GETProjectsIdNoteableNoteableIdNotes::CurrentUserCanViewTheNote>)>
Edited by 🤖 GitLab Bot 🤖

Merge request reports