diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-19 03:52:43 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-04-19 12:00:30 +0300 |
commit | 5330af3fa69d4c47437ce27480c7f3b74652b2ca (patch) | |
tree | ebb871f468004a74cac5d737a231cf92defdf210 /spec/lib/gitlab/push_data_builder_spec.rb | |
parent | 2384bed4d8e3f79461664911715e5f2a2a66c008 (diff) |
Using single builder for push and tag events
Diffstat (limited to 'spec/lib/gitlab/push_data_builder_spec.rb')
-rw-r--r-- | spec/lib/gitlab/push_data_builder_spec.rb | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/spec/lib/gitlab/push_data_builder_spec.rb b/spec/lib/gitlab/push_data_builder_spec.rb index d6fb65e6948..7fc34139eff 100644 --- a/spec/lib/gitlab/push_data_builder_spec.rb +++ b/spec/lib/gitlab/push_data_builder_spec.rb @@ -34,6 +34,12 @@ describe Gitlab::PushDataBuilder, lib: true do it { expect(data[:checkout_sha]).to eq('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } it { expect(data[:after]).to eq('8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b') } it { expect(data[:ref]).to eq('refs/tags/v1.1.0') } + it { expect(data[:user_id]).to eq(user.id) } + it { expect(data[:user_name]).to eq(user.name) } + it { expect(data[:user_email]).to eq(user.email) } + it { expect(data[:user_avatar]).to eq(user.avatar_url) } + it { expect(data[:project_id]).to eq(project.id) } + it { expect(data[:project]).to be_a(Hash) } it { expect(data[:commits]).to be_empty } it { expect(data[:total_commits_count]).to be_zero } @@ -45,26 +51,4 @@ describe Gitlab::PushDataBuilder, lib: true do not_to raise_error end end - - describe '.build_system' do - let(:data) do - described_class.build_system(project, user, Gitlab::Git::BLANK_SHA, - '8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b', - 'refs/tags/v1.1.0') - end - - it { expect(data).to be_a(Hash) } - it { expect(data[:before]).to eq(Gitlab::Git::BLANK_SHA) } - it { expect(data[:checkout_sha]).to eq('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } - it { expect(data[:after]).to eq('8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b') } - it { expect(data[:ref]).to eq('refs/tags/v1.1.0') } - it { expect(data[:user_id]).to eq(user.id) } - it { expect(data[:user_name]).to eq(user.name) } - it { expect(data[:user_email]).to eq(user.email) } - it { expect(data[:user_avatar]).to eq(user.avatar_url) } - it { expect(data[:project_id]).to eq(project.id) } - it { expect(data[:project]).to be_a(Hash) } - - include_examples 'project hook data' - end end |