diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-03-01 15:42:04 +0100 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-03-06 12:53:14 +0100 |
commit | 43b74afd8656df8228c19d5e5e6aee9f87abc244 (patch) | |
tree | c1f4a7b09d53af65ed13774e30f2a27be38c8052 /spec | |
parent | 986f470d40a3ed993bb6b2c2115a05c24eb575fa (diff) | |
download | gitlab-ce-43b74afd8656df8228c19d5e5e6aee9f87abc244.tar.gz |
Rename to UserInteractedProjects.
This is to avoid a mix-up with the existing concept of 'user
contributions'. See `User#contributed_projects` or
`Event#contributions`.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/event_spec.rb | 14 | ||||
-rw-r--r-- | spec/models/user_interacted_projects_spec.rb (renamed from spec/models/user_contributed_projects_spec.rb) | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 445de37d2b1..780eacbb8dc 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -50,18 +50,18 @@ describe Event do end end - describe 'after_create :track_user_contributed_projects' do + describe 'after_create :track_user_interacted_projects' do let(:event) { build(:push_event, project: project, author: project.owner) } - it 'passes event to UserContributedProjects.track' do - expect(UserContributedProjects).to receive(:available?).and_return(true) - expect(UserContributedProjects).to receive(:track).with(event) + it 'passes event to UserInteractedProjects.track' do + expect(UserInteractedProjects).to receive(:available?).and_return(true) + expect(UserInteractedProjects).to receive(:track).with(event) event.save end - it 'does not call UserContributedProjects.track if its not yet available' do - expect(UserContributedProjects).to receive(:available?).and_return(false) - expect(UserContributedProjects).not_to receive(:track) + it 'does not call UserInteractedProjects.track if its not yet available' do + expect(UserInteractedProjects).to receive(:available?).and_return(false) + expect(UserInteractedProjects).not_to receive(:track) event.save end end diff --git a/spec/models/user_contributed_projects_spec.rb b/spec/models/user_interacted_projects_spec.rb index 092821c8aea..503d89e7f86 100644 --- a/spec/models/user_contributed_projects_spec.rb +++ b/spec/models/user_interacted_projects_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe UserContributedProjects do +describe UserInteractedProjects do describe '.track' do subject { described_class.track(event) } let(:event) { build(:event) } |