Commit 9cabe04368024f44881e4269a008156f1629ab86
1 parent
68f4b597
Exists in
master
and in
4 other branches
tests for: Profile -> History
Showing
5 changed files
with
24 additions
and
0 deletions
Show diff stats
app/models/event.rb
... | ... | @@ -20,6 +20,7 @@ class Event < ActiveRecord::Base |
20 | 20 | delegate :title, to: :issue, prefix: true, allow_nil: true |
21 | 21 | delegate :title, to: :merge_request, prefix: true, allow_nil: true |
22 | 22 | |
23 | + belongs_to :author, class_name: "User" | |
23 | 24 | belongs_to :project |
24 | 25 | belongs_to :target, polymorphic: true |
25 | 26 | ... | ... |
features/profile/profile.feature
features/steps/profile/profile.rb
... | ... | @@ -41,4 +41,12 @@ class Profile < Spinach::FeatureSteps |
41 | 41 | find("#token").value.should_not == @old_token |
42 | 42 | find("#token").value.should == @user.reload.private_token |
43 | 43 | end |
44 | + | |
45 | + Given 'I have activity' do | |
46 | + Factory :closed_issue_event, author: current_user | |
47 | + end | |
48 | + | |
49 | + Then 'I should see my activity' do | |
50 | + page.should have_content "#{current_user.name} closed issue" | |
51 | + end | |
44 | 52 | end | ... | ... |
features/steps/shared/authentication.rb
spec/factories.rb