mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 10:56:11 +02:00
Add system test for filter_record_transformer
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
d346f22c6f
commit
bf893971b9
@ -0,0 +1,30 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class FilterRecordTransformerTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
login_with(FactoryBot.build(:user))
|
||||
@daemon = stub_daemon
|
||||
end
|
||||
|
||||
test "show form" do
|
||||
visit(daemon_setting_filter_record_transformer_path)
|
||||
assert do
|
||||
page.has_css?("textarea[name=\"setting[record]\"]")
|
||||
end
|
||||
end
|
||||
|
||||
test "update config" do
|
||||
value = "key value"
|
||||
assert do
|
||||
!@daemon.agent.config.include?(value)
|
||||
end
|
||||
visit(daemon_setting_filter_record_transformer_path)
|
||||
within("form") do
|
||||
fill_in("Record", with: value)
|
||||
end
|
||||
click_button(I18n.t("fluentd.common.finish"))
|
||||
assert do
|
||||
@daemon.agent.config.include?(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user