Skip to content

Commit

Permalink
Add test for wiki tag input field (publiclab#8295)
Browse files Browse the repository at this point in the history
* add tag input field to wiki editor

* fix code climate issue

* leave space between tag_input field an other buttons

* add test for wiki tag input
  • Loading branch information
Shulammite-Aso authored and reginaalyssa committed Oct 16, 2021
1 parent 11fcba7 commit 0baffca
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/functional/wiki_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ def teardown
assert_equal selector.size, 1
end

test 'should be able to add tag' do
title = 'All about balloon mapping'

post :create,
params: {
uid: users(:bob).id,
title: title,
body: 'This is fascinating documentation about balloon mapping.',
tags: 'balloon-mapping'
}

assert Node.last.has_tag('balloon-mapping')
end

test 'viewing edit wiki page' do
UserSession.find.destroy if UserSession.find
UserSession.create(users(:jeff)) # jeff user fixture is not a first-time-poster
Expand Down

0 comments on commit 0baffca

Please sign in to comment.