diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-05-13 04:21:01 -0300 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-05-31 11:24:58 -0300 |
commit | aaaed331ba06d14f0e071e0933a250c61caabf94 (patch) | |
tree | 2cfdded6acef3d5d38ed35d1d351788864d30d1e /spec | |
parent | ef4fedc18f5e2475aa36cc4327a76a496567c6fc (diff) | |
download | gitlab-ce-aaaed331ba06d14f0e071e0933a250c61caabf94.tar.gz |
Fix hook data for Wiki Page event
Added "wiki" section and removed "repository"
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_wiki_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index 91ebb612baa..58b57bd4fef 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -16,6 +16,12 @@ describe ProjectWiki, models: true do end end + describe '#web_url' do + it 'returns the full web URL to the wiki' do + expect(subject.web_url).to eq("#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/wikis/home") + end + end + describe "#url_to_repo" do it "returns the correct ssh url to the repo" do expect(subject.url_to_repo).to eq(gitlab_shell.url_to_repo(subject.path_with_namespace)) @@ -257,6 +263,13 @@ describe ProjectWiki, models: true do end end + describe '#hook_attrs' do + it 'returns a hash with values' do + expect(subject.hook_attrs).to be_a Hash + expect(subject.hook_attrs.keys).to contain_exactly(:web_url, :git_ssh_url, :git_http_url, :path_with_namespace, :default_branch) + end + end + private def create_temp_repo(path) |