Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
bba8e59a
Commit
bba8e59a
authored
Jan 12, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test hook and tests
parent
4e7df003
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
app/services/test_hook_service.rb
app/services/test_hook_service.rb
+1
-1
spec/models/assembla_service_spec.rb
spec/models/assembla_service_spec.rb
+1
-1
spec/models/flowdock_service_spec.rb
spec/models/flowdock_service_spec.rb
+1
-1
spec/models/gemnasium_service_spec.rb
spec/models/gemnasium_service_spec.rb
+1
-1
spec/models/pushover_service_spec.rb
spec/models/pushover_service_spec.rb
+1
-1
spec/models/slack_service_spec.rb
spec/models/slack_service_spec.rb
+1
-1
No files found.
app/controllers/projects/services_controller.rb
View file @
bba8e59a
...
...
@@ -24,7 +24,7 @@ class Projects::ServicesController < Projects::ApplicationController
end
def
test
data
=
Gitlab
::
PushDataBuilder
.
build
(
project
,
current_user
)
data
=
Gitlab
::
PushDataBuilder
.
build
_sample
(
project
,
current_user
)
@service
.
execute
(
data
)
redirect_to
:back
...
...
app/services/test_hook_service.rb
View file @
bba8e59a
class
TestHookService
def
execute
(
hook
,
current_user
)
data
=
Gitlab
::
PushDataBuilder
.
build
(
hook
.
project
,
current_user
)
data
=
Gitlab
::
PushDataBuilder
.
build
_sample
(
hook
.
project
,
current_user
)
hook
.
execute
(
data
)
end
end
spec/models/assembla_service_spec.rb
View file @
bba8e59a
...
...
@@ -33,7 +33,7 @@ describe AssemblaService, models: true do
token:
'verySecret'
,
subdomain:
'project_name'
)
@sample_data
=
Git
PushService
.
new
.
sample_data
(
project
,
user
)
@sample_data
=
Git
lab
::
PushDataBuilder
.
build_sample
(
project
,
user
)
@api_url
=
'https://atlas.assembla.com/spaces/project_name/github_tool?secret_key=verySecret'
WebMock
.
stub_request
(
:post
,
@api_url
)
end
...
...
spec/models/flowdock_service_spec.rb
View file @
bba8e59a
...
...
@@ -32,7 +32,7 @@ describe FlowdockService do
service_hook:
true
,
token:
'verySecret'
)
@sample_data
=
Git
PushService
.
new
.
sample_data
(
project
,
user
)
@sample_data
=
Git
lab
::
PushDataBuilder
.
build_sample
(
project
,
user
)
@api_url
=
'https://api.flowdock.com/v1/git/verySecret'
WebMock
.
stub_request
(
:post
,
@api_url
)
end
...
...
spec/models/gemnasium_service_spec.rb
View file @
bba8e59a
...
...
@@ -33,7 +33,7 @@ describe GemnasiumService do
token:
'verySecret'
,
api_key:
'GemnasiumUserApiKey'
)
@sample_data
=
Git
PushService
.
new
.
sample_data
(
project
,
user
)
@sample_data
=
Git
lab
::
PushDataBuilder
.
build_sample
(
project
,
user
)
end
it
"should call Gemnasium service"
do
Gemnasium
::
GitlabService
.
should_receive
(
:execute
).
with
(
an_instance_of
(
Hash
)).
once
...
...
spec/models/pushover_service_spec.rb
View file @
bba8e59a
...
...
@@ -36,7 +36,7 @@ describe PushoverService do
let
(
:pushover
)
{
PushoverService
.
new
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:sample_data
)
{
Git
PushService
.
new
.
sample_data
(
project
,
user
)
}
let
(
:sample_data
)
{
Git
lab
::
PushDataBuilder
.
build_sample
(
project
,
user
)
}
let
(
:api_key
)
{
'verySecret'
}
let
(
:user_key
)
{
'verySecret'
}
...
...
spec/models/slack_service_spec.rb
View file @
bba8e59a
...
...
@@ -34,7 +34,7 @@ describe SlackService do
let
(
:slack
)
{
SlackService
.
new
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:sample_data
)
{
Git
PushService
.
new
.
sample_data
(
project
,
user
)
}
let
(
:sample_data
)
{
Git
lab
::
PushDataBuilder
.
build_sample
(
project
,
user
)
}
let
(
:webhook_url
)
{
'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685'
}
before
do
...
...
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