Skip to content
Snippets Groups Projects

Update controller and serializer entity for actually importing groups

Merged Illya Klymov requested to merge 249160-group-migration-import-one-group-frontend into master
All threads resolved!
@@ -57,16 +57,18 @@
@@ -57,16 +57,18 @@
let(:client_response) do
let(:client_response) do
double(
double(
parsed_response: [
parsed_response: [
{ 'id' => 1, 'full_name' => 'group1', 'full_path' => 'full/path/group1' },
{ 'id' => 1, 'full_name' => 'group1', 'full_path' => 'full/path/group1', 'web_url' => 'http://demo.host/full/path/group1' },
{ 'id' => 2, 'full_name' => 'group2', 'full_path' => 'full/path/group2' }
{ 'id' => 2, 'full_name' => 'group2', 'full_path' => 'full/path/group2', 'web_url' => 'http://demo.host/full/path/group1' }
]
]
)
)
end
end
 
# rubocop: disable CodeReuse/ActiveRecord
before do
before do
allow(controller).to receive(:client).and_return(client)
allow(controller).to receive(:client).and_return(client)
allow(client).to receive(:get).with('groups', top_level_only: true).and_return(client_response)
allow(client).to receive(:get).with('groups', top_level_only: true).and_return(client_response)
end
end
 
# rubocop: enable CodeReuse/ActiveRecord
it 'returns serialized group data' do
it 'returns serialized group data' do
get :status, format: :json
get :status, format: :json
Loading