Sha256: d8d76b8bc52a01ecdca92d51e375e5b6e754d37049b5f3d0908172dc77242154

Contents?: true

Size: 858 Bytes

Versions: 4

Compression:

Stored size: 858 Bytes

Contents

require 'test_plugin_helper'

module ForemanSalt
  class SaltModuleTest < ActionDispatch::IntegrationTest

    test "index page" do
      FactoryGirl.create_list :salt_module, 50
      assert_index_page(salt_modules_path, "Salt State", "New Salt State")
    end

    test "create new page" do
      assert_new_button(salt_modules_path, "New Salt State", new_salt_module_path)
      fill_in "foreman_salt_salt_module_name", :with => "common"
      assert_submit_button(salt_modules_path)
      assert page.has_link? 'common'
    end

    test "edit page" do
      salt_module = FactoryGirl.create :salt_module
      visit salt_modules_path
      click_link salt_module.name 
      fill_in "foreman_salt_salt_module_name", :with => "some_other_name"
      assert_submit_button(salt_modules_path)
      assert page.has_link? 'some_other_name'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_salt-1.1.0 test/integration/salt_module_test.rb
foreman_salt-1.0.0 test/integration/salt_module_test.rb
foreman_salt-0.0.4 test/integration/salt_module_test.rb
foreman_salt-0.0.3 test/integration/salt_module_test.rb