Beispiele hinzugefügt

This commit is contained in:
Andreas Stephanides
2013-02-15 10:48:52 +01:00
parent 154e338360
commit 19b4ed31f4
23 changed files with 305 additions and 19 deletions

9
test/fixtures/beispiele.yml vendored Normal file
View 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

View 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

View File

@@ -0,0 +1,7 @@
require 'test_helper'
class BeispielTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@@ -0,0 +1,4 @@
require 'test_helper'
class BeispieleHelperTest < ActionView::TestCase
end