Fixed the issues

This commit is contained in:
Darby 2015-07-09 13:38:33 -07:00
parent c611b6f623
commit 360ee25ddb
4 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,7 @@ module GitlabMarkdownHelper
# Returns a random markdown tip for use as a textarea placeholder
def random_markdown_tip
"#{MARKDOWN_TIPS.sample}"
MARKDOWN_TIPS.sample
end
private

View File

@ -5,7 +5,7 @@
= render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field'
.comment-hints.clearfix
.pull-left #{link_to 'Markdown tip:', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
.pull-left #{link_to 'Markdown ', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
.pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 }
.note-form-actions

View File

@ -13,7 +13,8 @@
.comment-hints.clearfix
.pull-left
= link_to "Markdown tip:", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }
= link_to "Markdown ", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }
tip:
= random_markdown_tip
.pull-right
= link_to '#', class: 'markdown-selector', tabindex: -1 do

View File

@ -137,6 +137,7 @@ describe GitlabMarkdownHelper do
describe 'random_markdown_tip' do
it 'returns a random Markdown tip' do
stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip'])
expect(random_markdown_tip).to eq 'Random tip'
end
end
end