diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-17 19:27:30 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-17 22:10:00 +0300 |
commit | 24b105e2e1339fd65cc43727e550edb004277383 (patch) | |
tree | 476854995651f0a367a08d8c1accd1a283852e43 /spec/features/projects/blobs | |
parent | d4d9b731c41cdb4a8b933edff34bd9c9ddf1403a (diff) |
Add auxiliary blob viewers to dependency files
Diffstat (limited to 'spec/features/projects/blobs')
-rw-r--r-- | spec/features/projects/blobs/blob_show_spec.rb | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb index 9888624a509..c95003f3226 100644 --- a/spec/features/projects/blobs/blob_show_spec.rb +++ b/spec/features/projects/blobs/blob_show_spec.rb @@ -423,7 +423,43 @@ feature 'File blob', :js, feature: true do expect(page).to have_content('This project is licensed under the MIT License.') # shows a learn more link - expect(page).to have_link('Learn more about this license', 'http://choosealicense.com/licenses/mit/') + expect(page).to have_link('Learn more', 'http://choosealicense.com/licenses/mit/') + end + end + end + + context '*.gemspec' do + before do + project.add_master(project.creator) + + Files::CreateService.new( + project, + project.creator, + start_branch: 'master', + branch_name: 'master', + commit_message: "Add activerecord.gemspec", + file_path: 'activerecord.gemspec', + file_content: <<-SPEC.strip_heredoc + Gem::Specification.new do |s| + s.platform = Gem::Platform::RUBY + s.name = "activerecord" + end + SPEC + ).execute + + visit_blob('activerecord.gemspec') + end + + it 'displays an auxiliary viewer' do + aggregate_failures do + # shows license + expect(page).to have_content('This project manages its dependencies using RubyGems and defines a gem named activerecord.') + + # shows a link to the gem + expect(page).to have_link('activerecord', 'https://rubygems.org/gems/activerecord') + + # shows a learn more link + expect(page).to have_link('Learn more', 'http://choosealicense.com/licenses/mit/') end end end |