Sha256: dd6d5d16bd8fe410f1ac60bb4ff12db27476dd658e908ff159b21d98db90d24c

Contents?: true

Size: 818 Bytes

Versions: 5

Compression:

Stored size: 818 Bytes

Contents

require "test_helper"

class FluentdUITest < ActiveSupport::TestCase
  sub_test_case ".update_available?" do
    setup do
      @current_version = FluentdUI::VERSION
    end

    test "unavailable" do
      FluentdUI.latest_version = @current_version
      assert do
        !FluentdUI.update_available?
      end
    end

    test "available" do
      FluentdUI.latest_version = @current_version.succ
      assert do
        FluentdUI.update_available?
      end
    end
  end

  sub_test_case ".fluentd_version" do
    test "not ready" do
      stub(Fluentd).instance { nil }
      assert_nil(FluentdUI.fluentd_version)
    end

    test "ready" do
      target = FactoryBot.build(:fluentd)
      stub(Fluentd).instance{ target }
      assert_equal(target.agent.version, FluentdUI.fluentd_version)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fluentd-ui-1.2.1 test/lib/fluentd_ui_test.rb
fluentd-ui-1.2.0 test/lib/fluentd_ui_test.rb
fluentd-ui-1.1.0 test/lib/fluentd_ui_test.rb
fluentd-ui-1.0.1 test/lib/fluentd_ui_test.rb
fluentd-ui-1.0.0 test/lib/fluentd_ui_test.rb