diff options
author | Valery Sizov <valery@gitlab.com> | 2015-11-02 17:56:44 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-11-03 13:16:40 +0300 |
commit | 9479496f7584336788fc61121c096dfbcb3f6e4a (patch) | |
tree | 735eb8e0077c42629bf516b5498ff7e3ce5e4b2a /spec | |
parent | b9e53258c505abeda8a975b550f2cb276caaf01b (diff) |
Add added, modified and removed properties to commit object in webhook
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/push_data_builder_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/push_data_builder_spec.rb b/spec/lib/gitlab/push_data_builder_spec.rb index 1b8ba7b4d43..02710742625 100644 --- a/spec/lib/gitlab/push_data_builder_spec.rb +++ b/spec/lib/gitlab/push_data_builder_spec.rb @@ -17,6 +17,9 @@ describe 'Gitlab::PushDataBuilder' do it { expect(data[:repository][:git_ssh_url]).to eq(project.ssh_url_to_repo) } it { expect(data[:repository][:visibility_level]).to eq(project.visibility_level) } it { expect(data[:total_commits_count]).to eq(3) } + it { expect(data[:added]).to eq(["gitlab-grack"]) } + it { expect(data[:modified]).to eq([".gitmodules", "files/ruby/popen.rb", "files/ruby/regex.rb"]) } + it { expect(data[:removed]).to eq([]) } end describe :build do @@ -35,5 +38,8 @@ describe 'Gitlab::PushDataBuilder' do it { expect(data[:ref]).to eq('refs/tags/v1.1.0') } it { expect(data[:commits]).to be_empty } it { expect(data[:total_commits_count]).to be_zero } + it { expect(data[:added]).to eq([]) } + it { expect(data[:modified]).to eq([]) } + it { expect(data[:removed]).to eq([]) } end end |