diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-10 15:10:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-10 15:10:12 +0300 |
commit | 419966e5d34a98d89354ed658c33478ce02d8017 (patch) | |
tree | 6a83543e53f483b59953febc8d61a23b19dd5ccb /spec/helpers | |
parent | bfbd788e0910597b93b31020300b15952828c386 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/admin/deploy_key_helper_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/helpers/admin/deploy_key_helper_spec.rb b/spec/helpers/admin/deploy_key_helper_spec.rb new file mode 100644 index 00000000000..ca951ccf485 --- /dev/null +++ b/spec/helpers/admin/deploy_key_helper_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe Admin::DeployKeyHelper do + describe '#admin_deploy_keys_data' do + let_it_be(:edit_path) { '/admin/deploy_keys/:id/edit' } + let_it_be(:delete_path) { '/admin/deploy_keys/:id' } + let_it_be(:create_path) { '/admin/deploy_keys/new' } + let_it_be(:empty_state_svg_path) { '/assets/illustrations/empty-state/empty-deploy-keys-lg.svg' } + + subject(:result) { helper.admin_deploy_keys_data } + + it 'returns correct hash' do + expect(helper).to receive(:edit_admin_deploy_key_path).with(':id').and_return(edit_path) + expect(helper).to receive(:admin_deploy_key_path).with(':id').and_return(delete_path) + expect(helper).to receive(:new_admin_deploy_key_path).and_return(create_path) + expect(helper).to receive(:image_path).with('illustrations/empty-state/empty-deploy-keys-lg.svg').and_return(empty_state_svg_path) + + expect(result).to eq({ + edit_path: edit_path, + delete_path: delete_path, + create_path: create_path, + empty_state_svg_path: empty_state_svg_path + }) + end + end +end |