BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
216fb6ee
Commit
216fb6ee
authored
Oct 03, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix slack service speck.
parent
20179772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
slack_service_spec.rb
spec/models/slack_service_spec.rb
+4
-9
No files found.
spec/models/slack_service_spec.rb
View file @
216fb6ee
...
...
@@ -26,9 +26,7 @@ describe SlackService do
subject
.
active
=
true
end
it
{
should
validate_presence_of
:room
}
it
{
should
validate_presence_of
:subdomain
}
it
{
should
validate_presence_of
:token
}
it
{
should
validate_presence_of
:webhook
}
end
end
...
...
@@ -37,20 +35,17 @@ describe SlackService do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:sample_data
)
{
GitPushService
.
new
.
sample_data
(
project
,
user
)
}
let
(
:subdomain
)
{
'gitlab'
}
let
(
:token
)
{
'verySecret'
}
let
(
:webhook
)
{
'https://gitlabhq.slack.com/services/hooks?token=cdIj4r4LfXUOySDUjp0tk3OI'
}
let
(
:api_url
)
{
"https://
#{
subdomain
}
.slack.com/services/hooks/incoming-webhook?token=
#{
token
}
"
'https://gitlabhq.slack.com/services/hooks/incoming-webhook?token=cdIj4r4LfXUOySDUjp0tk3OI'
}
before
do
slack
.
stub
(
project:
project
,
project_id:
project
.
id
,
room:
'#gitlab'
,
service_hook:
true
,
subdomain:
subdomain
,
token:
token
webhook:
webhook
)
WebMock
.
stub_request
(
:post
,
api_url
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment