2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
shared_examples 'project hook data with deprecateds' do |project_key: :project|
|
2016-04-02 18:10:28 +05:30
|
|
|
it 'contains project data' do
|
|
|
|
expect(data[project_key][:name]).to eq(project.name)
|
|
|
|
expect(data[project_key][:description]).to eq(project.description)
|
|
|
|
expect(data[project_key][:web_url]).to eq(project.web_url)
|
|
|
|
expect(data[project_key][:avatar_url]).to eq(project.avatar_url)
|
|
|
|
expect(data[project_key][:git_http_url]).to eq(project.http_url_to_repo)
|
|
|
|
expect(data[project_key][:git_ssh_url]).to eq(project.ssh_url_to_repo)
|
|
|
|
expect(data[project_key][:namespace]).to eq(project.namespace.name)
|
|
|
|
expect(data[project_key][:visibility_level]).to eq(project.visibility_level)
|
2017-09-10 17:25:29 +05:30
|
|
|
expect(data[project_key][:path_with_namespace]).to eq(project.full_path)
|
2016-04-02 18:10:28 +05:30
|
|
|
expect(data[project_key][:default_branch]).to eq(project.default_branch)
|
|
|
|
expect(data[project_key][:homepage]).to eq(project.web_url)
|
|
|
|
expect(data[project_key][:url]).to eq(project.url_to_repo)
|
|
|
|
expect(data[project_key][:ssh_url]).to eq(project.ssh_url_to_repo)
|
|
|
|
expect(data[project_key][:http_url]).to eq(project.http_url_to_repo)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
shared_examples 'project hook data' do |project_key: :project|
|
2016-06-02 11:05:42 +05:30
|
|
|
it 'contains project data' do
|
|
|
|
expect(data[project_key][:name]).to eq(project.name)
|
|
|
|
expect(data[project_key][:description]).to eq(project.description)
|
|
|
|
expect(data[project_key][:web_url]).to eq(project.web_url)
|
|
|
|
expect(data[project_key][:avatar_url]).to eq(project.avatar_url)
|
|
|
|
expect(data[project_key][:git_http_url]).to eq(project.http_url_to_repo)
|
|
|
|
expect(data[project_key][:git_ssh_url]).to eq(project.ssh_url_to_repo)
|
|
|
|
expect(data[project_key][:namespace]).to eq(project.namespace.name)
|
|
|
|
expect(data[project_key][:visibility_level]).to eq(project.visibility_level)
|
2017-09-10 17:25:29 +05:30
|
|
|
expect(data[project_key][:path_with_namespace]).to eq(project.full_path)
|
2016-06-02 11:05:42 +05:30
|
|
|
expect(data[project_key][:default_branch]).to eq(project.default_branch)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
shared_examples 'deprecated repository hook data' do
|
2016-04-02 18:10:28 +05:30
|
|
|
it 'contains deprecated repository data' do
|
|
|
|
expect(data[:repository][:name]).to eq(project.name)
|
|
|
|
expect(data[:repository][:description]).to eq(project.description)
|
|
|
|
expect(data[:repository][:url]).to eq(project.url_to_repo)
|
|
|
|
expect(data[:repository][:homepage]).to eq(project.web_url)
|
|
|
|
end
|
|
|
|
end
|