fluentd-ui/test/integration/fluentd_ui_update_checking_test.rb
Kenji Okimoto 10d28765fc Add test/integration/fluentd_ui_update_checking_test.rb
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-07-31 09:16:30 +09:00

28 lines
630 B
Ruby

require "test_helper"
class UpdateCheckingTest < ActionDispatch::IntegrationTest
setup do
login_with(FactoryBot.build(:user))
end
teardown do
FluentdUI.latest_version = ::FluentdUI::VERSION
end
test "show popup if newer version is available" do
version = "9999.99"
FluentdUI.latest_version = version
visit root_path
within(".alert-info") do
assert_equal("fluentd-ui 9999.99 is available. Go to system information page", text)
end
end
test "not show popup newer version is not available" do
visit root_path
assert do
!page.has_css?(".alert-info")
end
end
end