Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2016-05-13 10:21:01 +0300
committerGabriel Mazetto <gabriel@gitlab.com>2016-05-31 17:24:58 +0300
commitaaaed331ba06d14f0e071e0933a250c61caabf94 (patch)
tree2cfdded6acef3d5d38ed35d1d351788864d30d1e /spec/models/project_wiki_spec.rb
parentef4fedc18f5e2475aa36cc4327a76a496567c6fc (diff)
Fix hook data for Wiki Page event
Added "wiki" section and removed "repository"
Diffstat (limited to 'spec/models/project_wiki_spec.rb')
-rw-r--r--spec/models/project_wiki_spec.rb13
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)