debian-mirror-gitlab/spec/controllers/projects/packages/packages_controller_spec.rb

29 lines
616 B
Ruby
Raw Normal View History

2022-03-02 08:16:31 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Projects::Packages::PackagesController do
let_it_be(:project) { create(:project, :public) }
let(:page) { :index }
let(:additional_parameters) { {} }
subject do
get page, params: additional_parameters.merge({
project_id: project,
namespace_id: project.namespace
})
end
context 'GET #index' do
it_behaves_like 'returning response status', :ok
end
context 'GET #show' do
let(:page) { :show }
let(:additional_parameters) { { id: 1 } }
it_behaves_like 'returning response status', :ok
end
end