diff options
author | Robert Speicher <robert@gitlab.com> | 2017-08-30 18:27:09 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-08-30 18:27:09 +0300 |
commit | f7c8434c7100c3c87eb2a75cd5a128e520d8c110 (patch) | |
tree | e49bbb9bcb5143d882f1a1293f6ca1721df84efb /features/steps | |
parent | f35d7d7f6ea04a38da822db902ad24108dfe94a2 (diff) | |
parent | 96e0020c70ba69de873067b092626295d8388bf0 (diff) |
Merge branch 'replace_spinach_user_lookup.feature' into 'master'
Replace 'project/user_lookup.feature' spinach test with an rspec analog
See merge request !13863
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/commits/user_lookup.rb | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/features/steps/project/commits/user_lookup.rb b/features/steps/project/commits/user_lookup.rb deleted file mode 100644 index 4599e0d032a..00000000000 --- a/features/steps/project/commits/user_lookup.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Spinach::Features::ProjectCommitsUserLookup < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - - step 'I click on commit link' do - visit project_commit_path(@project, sample_commit.id) - end - - step 'I click on another commit link' do - visit project_commit_path(@project, sample_commit.parent_id) - end - - step 'I have user with primary email' do - user_primary - end - - step 'I have user with secondary email' do - user_secondary - end - - step 'I see author based on primary email' do - check_author_link(sample_commit.author_email, user_primary) - end - - step 'I see author based on secondary email' do - check_author_link(sample_commit.author_email, user_secondary) - end - - def check_author_link(email, user) - author_link = find('.commit-author-link') - - expect(author_link['href']).to eq user_path(user) - expect(author_link['title']).to eq email - expect(find('.commit-author-name').text).to eq user.name - end - - def user_primary - @user_primary ||= create(:user, email: 'dmitriy.zaporozhets@gmail.com') - end - - def user_secondary - @user_secondary ||= begin - user = create(:user, email: 'dzaporozhets@example.com') - create(:email, { user: user, email: 'dmitriy.zaporozhets@gmail.com' }) - user - end - end -end |