server list looks like something
This commit is contained in:
49
web/test/controllers/operating_systems_controller_test.rb
Normal file
49
web/test/controllers/operating_systems_controller_test.rb
Normal file
@@ -0,0 +1,49 @@
|
||||
require 'test_helper'
|
||||
|
||||
class OperatingSystemsControllerTest < ActionController::TestCase
|
||||
setup do
|
||||
@operating_system = operating_systems(:one)
|
||||
end
|
||||
|
||||
test 'should get index' do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:operating_systems)
|
||||
end
|
||||
|
||||
test 'should get new' do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should create operating_system' do
|
||||
assert_difference('OperatingSystem.count') do
|
||||
post :create, operating_system: {}
|
||||
end
|
||||
|
||||
assert_redirected_to operating_system_path(assigns(:operating_system))
|
||||
end
|
||||
|
||||
test 'should show operating_system' do
|
||||
get :show, id: @operating_system
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get edit' do
|
||||
get :edit, id: @operating_system
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should update operating_system' do
|
||||
patch :update, id: @operating_system, operating_system: {}
|
||||
assert_redirected_to operating_system_path(assigns(:operating_system))
|
||||
end
|
||||
|
||||
test 'should destroy operating_system' do
|
||||
assert_difference('OperatingSystem.count', -1) do
|
||||
delete :destroy, id: @operating_system
|
||||
end
|
||||
|
||||
assert_redirected_to operating_systems_path
|
||||
end
|
||||
end
|
||||
49
web/test/controllers/servers_controller_test.rb
Normal file
49
web/test/controllers/servers_controller_test.rb
Normal file
@@ -0,0 +1,49 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ServersControllerTest < ActionController::TestCase
|
||||
setup do
|
||||
@server = servers(:one)
|
||||
end
|
||||
|
||||
test 'should get index' do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:servers)
|
||||
end
|
||||
|
||||
test 'should get new' do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should create server' do
|
||||
assert_difference('Server.count') do
|
||||
post :create, server: {}
|
||||
end
|
||||
|
||||
assert_redirected_to server_path(assigns(:server))
|
||||
end
|
||||
|
||||
test 'should show server' do
|
||||
get :show, id: @server
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get edit' do
|
||||
get :edit, id: @server
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should update server' do
|
||||
patch :update, id: @server, server: {}
|
||||
assert_redirected_to server_path(assigns(:server))
|
||||
end
|
||||
|
||||
test 'should destroy server' do
|
||||
assert_difference('Server.count', -1) do
|
||||
delete :destroy, id: @server
|
||||
end
|
||||
|
||||
assert_redirected_to servers_path
|
||||
end
|
||||
end
|
||||
11
web/test/fixtures/operating_systems.yml
vendored
Normal file
11
web/test/fixtures/operating_systems.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# This model initially had no columns defined. If you add columns to the
|
||||
# model remove the '{}' from the fixture names and add the columns immediately
|
||||
# below each fixture, per the syntax in the comments below
|
||||
#
|
||||
one: {}
|
||||
# column: value
|
||||
#
|
||||
two: {}
|
||||
# column: value
|
||||
11
web/test/fixtures/servers.yml
vendored
Normal file
11
web/test/fixtures/servers.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# This model initially had no columns defined. If you add columns to the
|
||||
# model remove the '{}' from the fixture names and add the columns immediately
|
||||
# below each fixture, per the syntax in the comments below
|
||||
#
|
||||
one: {}
|
||||
# column: value
|
||||
#
|
||||
two: {}
|
||||
# column: value
|
||||
7
web/test/models/operating_system_test.rb
Normal file
7
web/test/models/operating_system_test.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class OperatingSystemTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
7
web/test/models/server_test.rb
Normal file
7
web/test/models/server_test.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ServerTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Reference in New Issue
Block a user