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
Boxiang Sun
gitlab-ce
Commits
912d7f7b
Commit
912d7f7b
authored
Oct 04, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues importing services via Import/Export
parent
4be63f5b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
CHANGELOG
CHANGELOG
+1
-0
app/models/service.rb
app/models/service.rb
+1
-0
spec/models/service_spec.rb
spec/models/service_spec.rb
+17
-0
No files found.
CHANGELOG
View file @
912d7f7b
...
...
@@ -45,6 +45,7 @@ v 8.13.0 (unreleased)
- Changed Slack service user referencing from full name to username (Sebastian Poxhofer)
v 8.12.4 (unreleased)
- Fix issues importing services via Import/Export
- Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button is clicked. (lukehowell)
v 8.12.3
...
...
app/models/service.rb
View file @
912d7f7b
...
...
@@ -136,6 +136,7 @@ class Service < ActiveRecord::Base
end
def #{arg}=(value)
self.properties ||= {}
updated_properties['#{arg}'] = #{arg} unless #{arg}_changed?
self.properties['#{arg}'] = value
end
...
...
spec/models/service_spec.rb
View file @
912d7f7b
...
...
@@ -203,6 +203,23 @@ describe Service, models: true do
end
end
describe
'initialize service with no properties'
do
let
(
:service
)
do
GitlabIssueTrackerService
.
create
(
project:
create
(
:project
),
title:
'random title'
)
end
it
'does not raise error'
do
expect
{
service
}.
not_to
raise_error
end
it
'creates the properties'
do
expect
(
service
.
properties
).
to
eq
({
"title"
=>
"random title"
})
end
end
describe
"callbacks"
do
let
(
:project
)
{
create
(
:project
)
}
let!
(
:service
)
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