diff options
author | Eirik Lygre <eirik.lygre@gmail.com> | 2015-12-09 15:07:10 +0100 |
---|---|---|
committer | Eirik Lygre <eirik.lygre@gmail.com> | 2015-12-09 15:07:10 +0100 |
commit | bb79573c01ad77d6b52245d3af262bc56f79693f (patch) | |
tree | 1bd51c1c8adc50462f22591d6ab5af8315cf9eb6 /spec/models/commit_spec.rb | |
parent | 94dc9ef9e1a85b8a4506358479a549dc3a1306b6 (diff) | |
parent | 9bfd6c44e23754b6f699586f6a0cec2879e107e0 (diff) | |
download | gitlab-ce-bb79573c01ad77d6b52245d3af262bc56f79693f.tar.gz |
Merge branch 'master' into default_clone_protocol_based_on_user_keys
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 |