diff options
author | micael.bergeron <micaelbergeron@gmail.com> | 2017-12-01 14:08:30 -0500 |
---|---|---|
committer | micael.bergeron <micaelbergeron@gmail.com> | 2017-12-07 09:06:59 -0500 |
commit | 360b94ceba146935a40b02f39ed3d833eaea134a (patch) | |
tree | 37a6c9b9e3424dfc0cb5446ddb17be97bb34f379 /spec/helpers | |
parent | 17075a0bdc0c271e9f7a4f25829c0517656d5871 (diff) | |
download | gitlab-ce-360b94ceba146935a40b02f39ed3d833eaea134a.tar.gz |
adding view and feature specs
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/merge_requests_helper_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/helpers/merge_requests_helper_spec.rb b/spec/helpers/merge_requests_helper_spec.rb index fd7900c32f4..3008528e60c 100644 --- a/spec/helpers/merge_requests_helper_spec.rb +++ b/spec/helpers/merge_requests_helper_spec.rb @@ -1,7 +1,9 @@ require 'spec_helper' describe MergeRequestsHelper do + include ActionView::Helpers::UrlHelper include ProjectForksHelper + describe 'ci_build_details_path' do let(:project) { create(:project) } let(:merge_request) { MergeRequest.new } @@ -41,4 +43,19 @@ describe MergeRequestsHelper do it { is_expected.to eq([source_title, target_title]) } end end + + describe '#tab_link_for' do + let(:merge_request) { create(:merge_request, :simple) } + let(:options) { Hash.new } + + subject { tab_link_for(merge_request, :show, options) { 'Discussion' } } + + describe 'supports the :force_link option' do + let(:options) { { force_link: true } } + + it 'removes the data-toggle attributes' do + is_expected.not_to match(/data-toggle="tab"/) + end + end + end end |