diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-12 03:10:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-12 03:10:38 +0300 |
commit | e57da6ba898df025f93bf8d3a896c7c2ba2ab830 (patch) | |
tree | 0eb1feedb28db1bbf9a695aae76b025a65105404 /spec/helpers/application_helper_spec.rb | |
parent | 23790cda2b4145294d71591515acfe892d4c99a7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 1903b60a126..ad81c125055 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -891,38 +891,4 @@ RSpec.describe ApplicationHelper do end end end - - describe '#controller_full_path' do - let(:path) { 'some_path' } - let(:action) { 'show' } - - before do - allow(helper.controller).to receive(:controller_path).and_return(path) - allow(helper.controller).to receive(:action_name).and_return(action) - end - - context 'when is create action' do - let(:action) { 'create' } - - it 'transforms to "new" path' do - expect(helper.controller_full_path).to eq("#{path}/new") - end - end - - context 'when is update action' do - let(:action) { 'update' } - - it 'transforms to "edit" path' do - expect(helper.controller_full_path).to eq("#{path}/edit") - end - end - - context 'when is show action' do - let(:action) { 'show' } - - it 'passes through' do - expect(helper.controller_full_path).to eq("#{path}/#{action}") - end - end - end end |