diff options
Diffstat (limited to 'spec/features/commits_spec.rb')
-rw-r--r-- | spec/features/commits_spec.rb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/spec/features/commits_spec.rb b/spec/features/commits_spec.rb index 44646ffc602..8f561c8f90b 100644 --- a/spec/features/commits_spec.rb +++ b/spec/features/commits_spec.rb @@ -107,7 +107,7 @@ describe 'Commits' do describe 'Cancel build' do it 'cancels build' do visit ci_status_path(pipeline) - click_on 'Cancel' + find('a.btn[title="Cancel"]').click expect(page).to have_content 'canceled' end end @@ -177,4 +177,23 @@ describe 'Commits' do end end end + + context 'viewing commits for a branch' do + let(:branch_name) { 'master' } + let(:user) { create(:user) } + + before do + project.team << [user, :master] + login_with(user) + visit namespace_project_commits_path(project.namespace, project, branch_name) + end + + it 'includes the committed_date for each commit' do + commits = project.repository.commits(branch_name) + + commits.each do |commit| + expect(page).to have_content("committed #{commit.committed_date}") + end + end + end end |