diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-08 13:43:45 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-08 13:43:45 +0100 |
commit | 75486f09c4b8f2df17e2c16bf4d97fceb34dc9ad (patch) | |
tree | 9c44f07bf4991a208b969b8bddf0b04e1edb02be /spec/models/commit_spec.rb | |
parent | e7969d6f6c743ead94b3b430b9184ad21f647337 (diff) | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-75486f09c4b8f2df17e2c16bf4d97fceb34dc9ad.tar.gz |
Merge branch 'master' into zj/gitlab-ce-merge-if-green
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 974b52c1833..38a3dc1f4a6 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -107,4 +107,15 @@ eos # Include the subject in the repository stub. let(:extra_commits) { [subject] } end + + describe '#hook_attrs' do + let(:data) { commit.hook_attrs(with_changed_files: true) } + + 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 |