fluentd-ui/spec/features/out_elasticsearch_spec.rb
Kenji Okimoto 9820e5a7f6 Follow view chagens
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-06-20 18:30:55 +09:00

29 lines
751 B
Ruby

require "spec_helper"
describe "out_elasticsearch", stub: :daemon do
let(:exists_user) { build(:user) }
let(:match) { "test.out_forward.#{Time.now.to_i}.*" }
let(:location) { daemon_setting_out_elasticsearch_path }
before do
login_with exists_user
end
it "Shown form" do
visit location
page.should have_css('input[name="setting[pattern]"]')
end
it "Updated config after submit", js: true do
daemon.agent.config.should_not include(match)
visit location
within('form') do
fill_in "Pattern", with: match
fill_in "Index name", with: "index"
fill_in "Type name", with: "type_name"
end
click_button I18n.t("fluentd.common.finish")
daemon.agent.config.should include(match)
end
end