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:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2016-02-09 14:02:52 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-02-22 14:10:56 +0300
commitdf27b3a1742048358674733d9cb3392348d5e964 (patch)
treefd16fca8cf559793360141b21549ad3053a11178 /spec/controllers/autocomplete_controller_spec.rb
parent04d1b412587028260ac219a32bdf3b03ac022308 (diff)
Issuable can be assigned to author
Closes #9014 The only difference with #9014 is that I thoughed the author should also be able to assign the issue. If this is unwanted behavior Ill revert it.
Diffstat (limited to 'spec/controllers/autocomplete_controller_spec.rb')
-rw-r--r--spec/controllers/autocomplete_controller_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb
index 85379a8e984..0754a2889fc 100644
--- a/spec/controllers/autocomplete_controller_spec.rb
+++ b/spec/controllers/autocomplete_controller_spec.rb
@@ -143,4 +143,17 @@ describe AutocompleteController do
it { expect(body.size).to eq 0 }
end
end
+
+ context 'author of issuable included' do
+ before do
+ sign_in(user)
+ get(:users, author_id: non_member.id)
+ end
+
+ let(:body) { JSON.parse(response.body) }
+
+ it 'should also return the author' do
+ expect(body.first["username"]).to eq non_member.username
+ end
+ end
end