debian-mirror-gitlab/spec/features/projects/activity/user_sees_activity_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
1.1 KiB
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Projects > Activity > User sees activity' do
2018-10-15 14:42:47 +05:30
let(:project) { create(:project, :repository, :public) }
let(:user) { project.creator }
2018-12-05 23:21:45 +05:30
let(:issue) { create(:issue, project: project) }
2018-10-15 14:42:47 +05:30
before do
2018-12-05 23:21:45 +05:30
create(:event, :created, project: project, target: issue, author: user)
2018-10-15 14:42:47 +05:30
event = create(:push_event, project: project, author: user)
create(:push_event_payload,
event: event,
action: :created,
commit_to: '6d394385cf567f80a8fd85055db1ab4c5295806f',
ref: 'fix',
commit_count: 1)
end
it 'shows the last push in the activity page', :js do
2018-12-05 23:21:45 +05:30
visit activity_project_path(project)
2018-12-13 13:39:08 +05:30
expect(page).to have_content "#{user.name} #{user.to_reference} pushed new branch fix"
2018-10-15 14:42:47 +05:30
end
2018-12-05 23:21:45 +05:30
it 'allows to filter event with the "event_filter=issue" URL param', :js do
visit activity_project_path(project, event_filter: 'issue')
2018-12-13 13:39:08 +05:30
expect(page).not_to have_content "#{user.name} #{user.to_reference} pushed new branch fix"
expect(page).to have_content "#{user.name} #{user.to_reference} opened issue #{issue.to_reference}"
2018-12-05 23:21:45 +05:30
end
2018-10-15 14:42:47 +05:30
end