diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-22 09:06:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-22 09:06:14 +0000 |
commit | 76923eae4bc63d796c7a956a2931bd58f70fd324 (patch) | |
tree | 3adf726a7bd37a3bb29d8d17b8e421ae8cb31aff /spec/lib | |
parent | fbeeb1478c77a36c8e1f4e1e157539136e4ac4e2 (diff) | |
download | gitlab-ce-76923eae4bc63d796c7a956a2931bd58f70fd324.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/data_builder/push_spec.rb | 26 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/safe_model_attributes.yml | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/spec/lib/gitlab/data_builder/push_spec.rb b/spec/lib/gitlab/data_builder/push_spec.rb index 58509b69463..cbc03fc38eb 100644 --- a/spec/lib/gitlab/data_builder/push_spec.rb +++ b/spec/lib/gitlab/data_builder/push_spec.rb @@ -57,6 +57,32 @@ describe Gitlab::DataBuilder::Push do include_examples 'deprecated repository hook data' end + describe '.sample_data' do + let(:data) { described_class.sample_data } + + it { expect(data).to be_a(Hash) } + it { expect(data[:before]).to eq('95790bf891e76fee5e1747ab589903a6a1f80f22') } + it { expect(data[:after]).to eq('da1560886d4f094c3e6c9ef40349f7d38b5d27d7') } + it { expect(data[:ref]).to eq('refs/heads/master') } + it { expect(data[:project_id]).to eq(15) } + it { expect(data[:commits].size).to eq(1) } + it { expect(data[:total_commits_count]).to eq(1) } + it 'contains project data' do + expect(data[:project]).to be_a(Hash) + expect(data[:project][:id]).to eq(15) + expect(data[:project][:name]).to eq('gitlab') + expect(data[:project][:description]).to eq('') + expect(data[:project][:web_url]).to eq('http://test.example.com/gitlab/gitlab') + expect(data[:project][:avatar_url]).to eq('https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80') + expect(data[:project][:git_http_url]).to eq('http://test.example.com/gitlab/gitlab.git') + expect(data[:project][:git_ssh_url]).to eq('git@test.example.com:gitlab/gitlab.git') + expect(data[:project][:namespace]).to eq('gitlab') + expect(data[:project][:visibility_level]).to eq(0) + expect(data[:project][:path_with_namespace]).to eq('gitlab/gitlab') + expect(data[:project][:default_branch]).to eq('master') + end + end + describe '.build' do let(:data) do described_class.build( diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 8ae571a69ef..5b2a0043492 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -752,4 +752,4 @@ DesignManagement::Version: - created_at - sha - issue_id -- user_id +- author_id |