Sha256: 358a3dd94808dc25abd242dfce11831ba933542630a9c4e5bafba27ef9dc81b9
Contents?: true
Size: 1011 Bytes
Versions: 12
Compression:
Stored size: 1011 Bytes
Contents
require 'test_plugin_helper' module ForemanSalt class SaltKeysTest < ActionDispatch::IntegrationTest setup do @proxy = FactoryGirl.create :smart_proxy, :with_salt_feature ::ProxyAPI::Salt.any_instance.stubs(:autosign_list).returns( ['foo.example.com'] ) end test 'smart proxy page has autosign link' do assert_row_button(smart_proxies_path, @proxy.name, 'Salt Autosign', true) end test 'index page' do visit smart_proxy_salt_autosign_index_path(:smart_proxy_id => @proxy.id) assert find_link('Keys').visible?, 'Keys is not visible' assert has_content?("Autosign entries for #{@proxy.hostname}"), 'Page title does not appear' assert has_content?('Displaying'), 'Pagination "Display ..." does not appear' end test 'has list of autosign' do visit smart_proxy_salt_autosign_index_path(:smart_proxy_id => @proxy.id) assert has_content?('foo.example.com'), 'Missing autosign entry on index page' end end end
Version data entries
12 entries across 12 versions & 1 rubygems