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:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-10-25 19:12:12 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-10-25 19:20:23 +0300
commit7a525004a7c9fa7b5a4d11ec5f8bf7854519178c (patch)
tree5d5110d96c7cf1fb3e1fce6de63b6066e31b4528 /spec/features
parent9e6098a6db3fd99f1c156b81598476b9df286f60 (diff)
Preload user status for label events
This makes sure the user_status for the user of a label event is preloaded. Otherwise it would not be rendered in the fake system note.
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/resource_label_events_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/features/issues/resource_label_events_spec.rb b/spec/features/issues/resource_label_events_spec.rb
index 40c452c991a..b0764db7751 100644
--- a/spec/features/issues/resource_label_events_spec.rb
+++ b/spec/features/issues/resource_label_events_spec.rb
@@ -7,6 +7,7 @@ describe 'List issue resource label events', :js do
let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project, author: user) }
let!(:label) { create(:label, project: project, title: 'foo') }
+ let!(:user_status) { create(:user_status, user: user) }
context 'when user displays the issue' do
let!(:note) { create(:note_on_issue, author: user, project: project, noteable: issue, note: 'some note') }
@@ -23,6 +24,12 @@ describe 'List issue resource label events', :js do
expect(find("#note_#{event.discussion_id}")).to have_content 'added foo label'
end
end
+
+ it 'shows the user status on the system note for the label' do
+ page.within("#note_#{event.discussion_id}") do
+ expect(page).to show_user_status user_status
+ end
+ end
end
context 'when user adds label to the issue' do