summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-12 17:29:22 +0000
committerPhil Hughes <me@iamphill.com>2019-02-26 12:21:16 +0000
commite9b28a28a7494500f0295b87cf9f3389d48a8c30 (patch)
tree56ed313c0a31045f7bba5455371644593bfa00a3 /spec/helpers
parentb0097199a329c4de4eacc99a7d46d62c4ec0a1e0 (diff)
downloadgitlab-ce-e9b28a28a7494500f0295b87cf9f3389d48a8c30.tar.gz
Makes the Web IDE the default editor
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/42382
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/blob_helper_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb
index f709f152c92..2bc3933809f 100644
--- a/spec/helpers/blob_helper_spec.rb
+++ b/spec/helpers/blob_helper_spec.rb
@@ -50,12 +50,20 @@ describe BlobHelper do
end
it 'returns a link with the proper route' do
+ stub_feature_flags(web_ide_default: false)
link = edit_blob_button(project, 'master', 'README.md')
expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md")
end
+ it 'returns a link with a Web IDE route' do
+ link = edit_blob_button(project, 'master', 'README.md')
+
+ expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/-/ide/project/#{project.full_path}/edit/master/-/README.md")
+ end
+
it 'returns a link with the passed link_opts on the expected route' do
+ stub_feature_flags(web_ide_default: false)
link = edit_blob_button(project, 'master', 'README.md', link_opts: { mr_id: 10 })
expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md?mr_id=10")