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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5bceba3b
Commit
5bceba3b
authored
Jun 29, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to service in integrations/github_spec.rb
parent
f9782c3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
ee/spec/models/integrations/github_spec.rb
ee/spec/models/integrations/github_spec.rb
+9
-9
No files found.
ee/spec/models/integrations/github_spec.rb
View file @
5bceba3b
...
@@ -11,7 +11,7 @@ RSpec.describe Integrations::Github do
...
@@ -11,7 +11,7 @@ RSpec.describe Integrations::Github do
let
(
:repository_name
)
{
'my-project'
}
let
(
:repository_name
)
{
'my-project'
}
let
(
:base_url
)
{
'https://github.com'
}
let
(
:base_url
)
{
'https://github.com'
}
let
(
:repository_url
)
{
"
#{
base_url
}
/
#{
owner
}
/
#{
repository_name
}
"
}
let
(
:repository_url
)
{
"
#{
base_url
}
/
#{
owner
}
/
#{
repository_name
}
"
}
let
(
:
service
_params
)
do
let
(
:
integration
_params
)
do
{
{
active:
true
,
active:
true
,
project:
project
,
project:
project
,
...
@@ -22,7 +22,7 @@ RSpec.describe Integrations::Github do
...
@@ -22,7 +22,7 @@ RSpec.describe Integrations::Github do
}
}
end
end
subject
{
described_class
.
create!
(
service
_params
)
}
subject
{
described_class
.
create!
(
integration
_params
)
}
before
do
before
do
stub_licensed_features
(
github_project_service_integration:
true
)
stub_licensed_features
(
github_project_service_integration:
true
)
...
@@ -38,7 +38,7 @@ RSpec.describe Integrations::Github do
...
@@ -38,7 +38,7 @@ RSpec.describe Integrations::Github do
describe
'#valid?'
do
describe
'#valid?'
do
it
'is not valid'
do
it
'is not valid'
do
expect
(
described_class
.
new
(
service
_params
)).
not_to
be_valid
expect
(
described_class
.
new
(
integration
_params
)).
not_to
be_valid
end
end
end
end
end
end
...
@@ -80,14 +80,14 @@ RSpec.describe Integrations::Github do
...
@@ -80,14 +80,14 @@ RSpec.describe Integrations::Github do
let
(
:properties
)
{
subject
.
reload
.
properties
.
symbolize_keys
}
let
(
:properties
)
{
subject
.
reload
.
properties
.
symbolize_keys
}
it
'does not overwrite existing integrations'
do
it
'does not overwrite existing integrations'
do
subject
.
update!
(
service
_params
.
slice
(
:properties
))
subject
.
update!
(
integration
_params
.
slice
(
:properties
))
expect
(
properties
).
to
match
(
service
_params
[
:properties
])
expect
(
properties
).
to
match
(
integration
_params
[
:properties
])
expect
(
subject
.
static_context
).
to
be_nil
expect
(
subject
.
static_context
).
to
be_nil
end
end
context
'when initialized without properties'
do
context
'when initialized without properties'
do
let
(
:
service
_params
)
do
let
(
:
integration
_params
)
do
{
{
active:
false
,
active:
false
,
project:
project
project:
project
...
@@ -100,7 +100,7 @@ RSpec.describe Integrations::Github do
...
@@ -100,7 +100,7 @@ RSpec.describe Integrations::Github do
end
end
context
'when initialized with static_context as false'
do
context
'when initialized with static_context as false'
do
let
(
:
service
_params
)
do
let
(
:
integration
_params
)
do
{
{
active:
false
,
active:
false
,
project:
project
,
project:
project
,
...
@@ -114,7 +114,7 @@ RSpec.describe Integrations::Github do
...
@@ -114,7 +114,7 @@ RSpec.describe Integrations::Github do
end
end
context
'when initialized with static_context as false'
do
context
'when initialized with static_context as false'
do
let
(
:
service
_params
)
do
let
(
:
integration
_params
)
do
{
{
active:
false
,
active:
false
,
project:
project
,
project:
project
,
...
@@ -135,7 +135,7 @@ RSpec.describe Integrations::Github do
...
@@ -135,7 +135,7 @@ RSpec.describe Integrations::Github do
let
(
:status_message
)
{
double
(
sha:
sha
,
status: :success
,
status_options:
status_options
)
}
let
(
:status_message
)
{
double
(
sha:
sha
,
status: :success
,
status_options:
status_options
)
}
let
(
:notifier
)
{
instance_double
(
Integrations
::
Github
::
StatusNotifier
)
}
let
(
:notifier
)
{
instance_double
(
Integrations
::
Github
::
StatusNotifier
)
}
context
'the
service
is invalid'
do
context
'the
integration
is invalid'
do
it
'does not notify GitHub of a status change'
do
it
'does not notify GitHub of a status change'
do
allow
(
subject
).
to
receive
(
:invalid?
).
and_return
(
true
)
allow
(
subject
).
to
receive
(
:invalid?
).
and_return
(
true
)
...
...
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