Project

General

Profile

Revision fb471374

Added by Michael Moll about 4 years ago

Update to Rails 5.1

  • Fixes #21814 - Add Rails 5 migrations
  • Refs #22045 - update TargetRailsVersion for rubocop
  • Refs #22045 - use ApplicationRecord
  • Refs #22045 - stop using HttpPositionalArguments
  • Fixes #22046 - use rubocop 0.52

View differences:

test/functionals/containers_steps_controller_test.rb
12 12
    test 'wizard finishes with a redirect to the managed container' do
13 13
      Service::Containers.any_instance.expects(:start_container!).with(equals(@state))
14 14
        .returns(@container)
15
      put :update, { :wizard_state_id => @state.id,
16
                     :id => :environment,
17
                     :start_on_create => true,
18
                     :docker_container_wizard_states_environment => { :tty => false } },
19
          set_session_user
15
      put :update, params: { :wizard_state_id => @state.id, :id => :environment, :start_on_create => true, :docker_container_wizard_states_environment => { :tty => false } }, session: set_session_user
20 16

  
21 17
      assert_redirected_to container_path(:id => @container.id)
22 18
    end
......
31 27
      end
32 28

  
33 29
      test 'image show doesnot load katello' do
34
        get :show, { :wizard_state_id => @state.id, :id => :image }, set_session_user
30
        get :show, params: { :wizard_state_id => @state.id, :id => :image }, session: set_session_user
35 31
        refute @state.image.katello?
36 32
        refute response.body.include?("katello") # this is code generated by katello partial
37 33
        docker_image = @controller.instance_eval do
......
54 50
        end
55 51

  
56 52
        test 'has no errors if the image exists' do
57
          put :update, @params, set_session_user
53
          put :update, params: @params, session: set_session_user
58 54
          assert_valid @state.image
59 55
          assert css_select('#hub_image_search.has-error').size == 0
60 56
        end
61 57

  
62 58
        test 'shows an error when the image does not exist' do
63 59
          stub_image_existance(false)
64
          put :update, @params, set_session_user
60
          put :update, params: @params, session: set_session_user
65 61
          refute_valid @state.image
66 62
          assert_select '#hub_image_search.has-error'
67 63
        end
......
75 71
      @state.environment = DockerContainerWizardStates::Environment.create!(environment_options)
76 72
      @state.environment.exposed_ports.create!(:key => '1654', :value => 'tcp')
77 73
      @state.environment.exposed_ports.create!(:key => '1655', :value => 'udp')
78
      get :show, { :wizard_state_id => @state.id, :id => :environment }, set_session_user
74
      get :show, params: { :wizard_state_id => @state.id, :id => :environment }, session: set_session_user
79 75
      assert response.body.include?("1654")
80 76
      assert response.body.include?("1655")
81 77

  
......
97 93
      @state.environment = DockerContainerWizardStates::Environment.create!(environment_options)
98 94
      @state.environment.dns.create!(:key => '18.18.18.18')
99 95
      @state.environment.dns.create!(:key => '19.19.19.19')
100
      get :show, { :wizard_state_id => @state.id, :id => :environment }, set_session_user
96
      get :show, params: { :wizard_state_id => @state.id, :id => :environment }, session: set_session_user
101 97
      assert response.body.include?("18.18.18.18")
102 98
      assert response.body.include?("19.19.19.19")
103 99

  

Also available in: Unified diff