diff options
Diffstat (limited to 'spec/frontend/fixtures/api_deploy_keys.rb')
-rw-r--r-- | spec/frontend/fixtures/api_deploy_keys.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/api_deploy_keys.rb b/spec/frontend/fixtures/api_deploy_keys.rb new file mode 100644 index 00000000000..7027b8c975b --- /dev/null +++ b/spec/frontend/fixtures/api_deploy_keys.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe API::DeployKeys, '(JavaScript fixtures)', type: :request do + include ApiHelpers + include JavaScriptFixturesHelpers + + let_it_be(:admin) { create(:admin) } + let_it_be(:project) { create(:project) } + let_it_be(:project2) { create(:project) } + let_it_be(:deploy_key) { create(:deploy_key, public: true) } + let_it_be(:deploy_key2) { create(:deploy_key, public: true) } + let_it_be(:deploy_keys_project) { create(:deploy_keys_project, :write_access, project: project, deploy_key: deploy_key) } + let_it_be(:deploy_keys_project2) { create(:deploy_keys_project, :write_access, project: project2, deploy_key: deploy_key) } + let_it_be(:deploy_keys_project3) { create(:deploy_keys_project, :write_access, project: project, deploy_key: deploy_key2) } + let_it_be(:deploy_keys_project4) { create(:deploy_keys_project, :write_access, project: project2, deploy_key: deploy_key2) } + + it 'api/deploy_keys/index.json' do + get api("/deploy_keys", admin) + + expect(response).to be_successful + end +end |