Beispiele hinzugefügt
This commit is contained in:
9
test/fixtures/beispiele.yml
vendored
Normal file
9
test/fixtures/beispiele.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
name:
|
||||
desc: MyText
|
||||
|
||||
two:
|
||||
name:
|
||||
desc: MyText
|
||||
49
test/functional/beispiele_controller_test.rb
Normal file
49
test/functional/beispiele_controller_test.rb
Normal file
@@ -0,0 +1,49 @@
|
||||
require 'test_helper'
|
||||
|
||||
class BeispieleControllerTest < ActionController::TestCase
|
||||
setup do
|
||||
@beispiel = beispiele(:one)
|
||||
end
|
||||
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:beispiele)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create beispiel" do
|
||||
assert_difference('Beispiel.count') do
|
||||
post :create, beispiel: { desc: @beispiel.desc, name: @beispiel.name }
|
||||
end
|
||||
|
||||
assert_redirected_to beispiel_path(assigns(:beispiel))
|
||||
end
|
||||
|
||||
test "should show beispiel" do
|
||||
get :show, id: @beispiel
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get :edit, id: @beispiel
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update beispiel" do
|
||||
put :update, id: @beispiel, beispiel: { desc: @beispiel.desc, name: @beispiel.name }
|
||||
assert_redirected_to beispiel_path(assigns(:beispiel))
|
||||
end
|
||||
|
||||
test "should destroy beispiel" do
|
||||
assert_difference('Beispiel.count', -1) do
|
||||
delete :destroy, id: @beispiel
|
||||
end
|
||||
|
||||
assert_redirected_to beispiele_path
|
||||
end
|
||||
end
|
||||
7
test/unit/beispiel_test.rb
Normal file
7
test/unit/beispiel_test.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class BeispielTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
4
test/unit/helpers/beispiele_helper_test.rb
Normal file
4
test/unit/helpers/beispiele_helper_test.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class BeispieleHelperTest < ActionView::TestCase
|
||||
end
|
||||
Reference in New Issue
Block a user