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
8aae7405
Commit
8aae7405
authored
Nov 07, 2018
by
Francisco Javier López
Committed by
Sean McGivern
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with wiki page create message
parent
1b788c66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
app/models/wiki_page.rb
app/models/wiki_page.rb
+1
-1
changelogs/unreleased/fj-50890-fix-commit-message-wiki-new-page.yml
.../unreleased/fj-50890-fix-commit-message-wiki-new-page.yml
+5
-0
spec/models/wiki_page_spec.rb
spec/models/wiki_page_spec.rb
+17
-6
No files found.
app/models/wiki_page.rb
View file @
8aae7405
...
@@ -195,7 +195,7 @@ class WikiPage
...
@@ -195,7 +195,7 @@ class WikiPage
update_attributes
(
attrs
)
update_attributes
(
attrs
)
save
(
page_details:
title
)
do
save
(
page_details:
title
)
do
wiki
.
create_page
(
title
,
content
,
format
,
message
)
wiki
.
create_page
(
title
,
content
,
format
,
attrs
[
:message
]
)
end
end
end
end
...
...
changelogs/unreleased/fj-50890-fix-commit-message-wiki-new-page.yml
0 → 100644
View file @
8aae7405
---
title
:
Fix bug with wiki page create message
merge_request
:
22849
author
:
type
:
fixed
spec/models/wiki_page_spec.rb
View file @
8aae7405
...
@@ -126,23 +126,34 @@ describe WikiPage do
...
@@ -126,23 +126,34 @@ describe WikiPage do
end
end
end
end
before
do
@wiki_attr
=
{
title:
"Index"
,
content:
"Home Page"
,
format:
"markdown"
}
end
describe
"#create"
do
describe
"#create"
do
let
(
:wiki_attr
)
do
{
title:
"Index"
,
content:
"Home Page"
,
format:
"markdown"
,
message:
'Custom Commit Message'
}
end
after
do
after
do
destroy_page
(
"Index"
)
destroy_page
(
"Index"
)
end
end
context
"with valid attributes"
do
context
"with valid attributes"
do
it
"saves the wiki page"
do
it
"saves the wiki page"
do
subject
.
create
(
@
wiki_attr
)
subject
.
create
(
wiki_attr
)
expect
(
wiki
.
find_page
(
"Index"
)).
not_to
be_nil
expect
(
wiki
.
find_page
(
"Index"
)).
not_to
be_nil
end
end
it
"returns true"
do
it
"returns true"
do
expect
(
subject
.
create
(
@wiki_attr
)).
to
eq
(
true
)
expect
(
subject
.
create
(
wiki_attr
)).
to
eq
(
true
)
end
it
'saves the wiki page with message'
do
subject
.
create
(
wiki_attr
)
expect
(
wiki
.
find_page
(
"Index"
).
message
).
to
eq
'Custom Commit Message'
end
end
end
end
end
end
...
...
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