Add test/integration/fluentd/setting/notes_test.rb

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-07-31 14:17:25 +09:00
parent 3567a98afc
commit 2e3d599628
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1

View File

@ -0,0 +1,27 @@
require "test_helper"
class NotesTest < ActionDispatch::IntegrationTest
include ConfigHistories::DaemonHaveSomeConfigHistories
setup do
login_with(FactoryBot.build(:user))
end
sub_test_case "update" do
setup do
visit("/daemon/setting/histories")
end
test "update a content of the first note" do
content = "This config file is for ..."
within(first("form")) do
first(".note-content").set(content)
click_button(I18n.t('terms.save'))
end
within(first("form")) do
assert_equal(content, first(".note-content").value)
end
end
end
end