summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-12-04 16:23:21 +0200
committerValery Sizov <vsv2711@gmail.com>2015-12-04 16:23:21 +0200
commit5c1b49f494f07bf37ba3c60f3b9f70d1842d8b60 (patch)
tree309cb7f2725989f5cf52520688f484469081ed01 /spec/models/commit_spec.rb
parent4de7f32c60ea1f61768f9e8b18c3dca3edae9fdb (diff)
downloadgitlab-ce-5c1b49f494f07bf37ba3c60f3b9f70d1842d8b60.tar.gz
Add added, modified and removed properties to commit object in webhook
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r--spec/models/commit_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index 90be9324951..b417bc98fa7 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -100,4 +100,15 @@ eos
# Include the subject in the repository stub.
let(:extra_commits) { [subject] }
end
+
+ describe '#hook_attrs' do
+ let(:data) { commit.hook_attrs }
+
+ it { expect(data).to be_a(Hash) }
+ it { expect(data[:message]).to include('Add submodule from gitlab.com') }
+ it { expect(data[:timestamp]).to eq('2014-02-27T11:01:38+02:00') }
+ it { expect(data[:added]).to eq(["gitlab-grack"]) }
+ it { expect(data[:modified]).to eq([".gitmodules"]) }
+ it { expect(data[:removed]).to eq([]) }
+ end
end