debian-mirror-gitlab/spec/serializers/import/gitlab_provider_repo_entity_spec.rb

28 lines
595 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Import::GitlabProviderRepoEntity do
2020-06-23 00:09:42 +05:30
let(:repo_data) do
{
'id' => 1,
'path_with_namespace' => 'demo/test',
'path' => 'test',
'web_url' => 'https://gitlab.com/demo/test'
}
end
subject { described_class.new(repo_data).as_json }
it_behaves_like 'exposes required fields for import entity' do
let(:expected_values) do
{
id: 1,
full_name: 'demo/test',
sanitized_name: 'test',
provider_link: 'https://gitlab.com/demo/test'
}
end
end
end