diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-15 08:08:22 -0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-04-19 11:00:30 +0200 |
commit | ee1090e2b2bc7b3762f6e2775f3fd15e92ae212b (patch) | |
tree | 9df863f27349ca2a95d0e6f16d99b85d4806d992 /spec/support | |
parent | 53a1d705fe536ad373faa77ba1ef5196ff49a98b (diff) | |
download | gitlab-ce-ee1090e2b2bc7b3762f6e2775f3fd15e92ae212b.tar.gz |
Added System Hooks for push and tag_push
Code is based on Project Webhooks, removing deprecations and without
commits listing.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/project_hook_data_shared_example.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/support/project_hook_data_shared_example.rb b/spec/support/project_hook_data_shared_example.rb index 422083875d7..7dbaa6a6459 100644 --- a/spec/support/project_hook_data_shared_example.rb +++ b/spec/support/project_hook_data_shared_example.rb @@ -1,4 +1,4 @@ -RSpec.shared_examples 'project hook data' do |project_key: :project| +RSpec.shared_examples 'project hook data with deprecateds' do |project_key: :project| it 'contains project data' do expect(data[project_key][:name]).to eq(project.name) expect(data[project_key][:description]).to eq(project.description) @@ -17,6 +17,21 @@ RSpec.shared_examples 'project hook data' do |project_key: :project| end end +RSpec.shared_examples 'project hook data' do |project_key: :project| + it 'contains project data' do + expect(data[project_key][:name]).to eq(project.name) + expect(data[project_key][:description]).to eq(project.description) + expect(data[project_key][:web_url]).to eq(project.web_url) + expect(data[project_key][:avatar_url]).to eq(project.avatar_url) + expect(data[project_key][:git_http_url]).to eq(project.http_url_to_repo) + expect(data[project_key][:git_ssh_url]).to eq(project.ssh_url_to_repo) + expect(data[project_key][:namespace]).to eq(project.namespace.name) + expect(data[project_key][:visibility_level]).to eq(project.visibility_level) + expect(data[project_key][:path_with_namespace]).to eq(project.path_with_namespace) + expect(data[project_key][:default_branch]).to eq(project.default_branch) + end +end + RSpec.shared_examples 'deprecated repository hook data' do |project_key: :project| it 'contains deprecated repository data' do expect(data[:repository][:name]).to eq(project.name) |