summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/events/_event_issue.atom.haml3
-rw-r--r--app/views/events/_event_merge_request.atom.haml3
-rw-r--r--features/steps/dashboard/event_filters.rb2
-rw-r--r--spec/features/atom/dashboard_spec.rb29
4 files changed, 33 insertions, 4 deletions
diff --git a/app/views/events/_event_issue.atom.haml b/app/views/events/_event_issue.atom.haml
index 030c961c355..eba2b63797a 100644
--- a/app/views/events/_event_issue.atom.haml
+++ b/app/views/events/_event_issue.atom.haml
@@ -1,2 +1,3 @@
%div{xmlns: "http://www.w3.org/1999/xhtml"}
- = markdown issue.description
+ - if issue.description.present?
+ = markdown issue.description
diff --git a/app/views/events/_event_merge_request.atom.haml b/app/views/events/_event_merge_request.atom.haml
index ab3a485e908..0aea2d17d65 100644
--- a/app/views/events/_event_merge_request.atom.haml
+++ b/app/views/events/_event_merge_request.atom.haml
@@ -1,2 +1,3 @@
%div{xmlns: "http://www.w3.org/1999/xhtml"}
- = markdown merge_request.description
+ - if merge_request.description.present?
+ = markdown merge_request.description
diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb
index d0fe5c9b64b..801ea400a7a 100644
--- a/features/steps/dashboard/event_filters.rb
+++ b/features/steps/dashboard/event_filters.rb
@@ -82,6 +82,4 @@ class EventFilters < Spinach::FeatureSteps
When 'I click "merge" event filter' do
click_link("merged_event_filter")
end
-
end
-
diff --git a/spec/features/atom/dashboard_spec.rb b/spec/features/atom/dashboard_spec.rb
index e5d9f8ab5d5..a72a41fdf39 100644
--- a/spec/features/atom/dashboard_spec.rb
+++ b/spec/features/atom/dashboard_spec.rb
@@ -10,5 +10,34 @@ describe "Dashboard Feed", feature: true do
page.body.should have_selector("feed title")
end
end
+
+ context 'feed content' do
+ let(:project) { create(:project) }
+ let(:issue) { create(:issue, project: project, author: user, description: '') }
+ let(:note) { create(:note, noteable: issue, author: user, note: 'Bug confirmed', project: project) }
+
+ before do
+ project.team << [user, :master]
+ issue_event(issue, user)
+ note_event(note, user)
+ visit dashboard_path(:atom, private_token: user.private_token)
+ end
+
+ it "should have issue opened event" do
+ page.body.should have_content("#{user.name} opened issue ##{issue.iid}")
+ end
+
+ it "should have issue comment event" do
+ page.body.should have_content("#{user.name} commented on issue ##{issue.iid}")
+ end
+ end
+ end
+
+ def issue_event(issue, user)
+ EventCreateService.new.open_issue(issue, user)
+ end
+
+ def note_event(note, user)
+ EventCreateService.new.leave_note(note, user)
end
end