Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-22 12:06:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-22 12:06:14 +0300
commit76923eae4bc63d796c7a956a2931bd58f70fd324 (patch)
tree3adf726a7bd37a3bb29d8d17b8e421ae8cb31aff /spec/lib/gitlab/data_builder
parentfbeeb1478c77a36c8e1f4e1e157539136e4ac4e2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/data_builder')
-rw-r--r--spec/lib/gitlab/data_builder/push_spec.rb26
1 files changed, 26 insertions, 0 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(