Sha256: 35891ea76a9b53c7a6d0024ee9df3f5b5702e8a6ec106de43e7fc56b1cfc83fb

Contents?: true

Size: 665 Bytes

Versions: 22

Compression:

Stored size: 665 Bytes

Contents

require 'test_plugin_helper'

class OpenscapProxiesControllerTest < ActionController::TestCase
  include ActionView::Helpers::DateHelper

  test "should render spool error" do
    spool_error = { "timestamp" => 1_487_144_633.951_368, "level" => "ERROR", "message"=> "Failed to parse Arf Report in test" }
    OpenscapProxiesController.any_instance.stubs(:find_spool_error).returns(spool_error)
    proxy = FactoryGirl.create(:openscap_proxy)
    get :openscap_spool, { :id => proxy.id }, set_session_user
    assert_template :partial => 'smart_proxies/_openscap_spool'
    assert @response.body.match(time_ago_in_words(Time.at(spool_error["timestamp"])))
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
foreman_openscap-0.7.13 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.12 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.11 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.10 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.8.3 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.9 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.8 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.7 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.8.2 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.6 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.8.1 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.5 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.8.0 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.4 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.3 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.2 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.1 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.6.7 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.7.0 test/functional/openscap_proxies_controller_test.rb
foreman_openscap-0.6.6 test/functional/openscap_proxies_controller_test.rb