GitHub Account angelegt

This commit is contained in:
Andreas Stephanides
2013-02-12 02:05:12 +01:00
commit 3d11400d5e
216 changed files with 5031 additions and 0 deletions

0
test/fixtures/.gitkeep vendored Normal file
View File

15
test/fixtures/lvas.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name: MyString
desc: MyText
ects:
lvanr:
stunden: 1.5
two:
name: MyString
desc: MyText
ects:
lvanr:
stunden: 1.5

13
test/fixtures/modulgruppen.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
type:
phase: 1
studium_id: 1
name: MyString
two:
type:
phase: 1
studium_id: 1
name: MyString

9
test/fixtures/moduls.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name: MyString
desc: MyText
two:
name: MyString
desc: MyText

11
test/fixtures/neuigkeiten.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
title: MyString
text: MyText
datum: 2013-01-19 16:29:59
two:
title: MyString
text: MyText
datum: 2013-01-19 16:29:59

11
test/fixtures/rubriken.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name:
desc:
prio: 1
two:
name:
desc:
prio: 1

13
test/fixtures/semesters.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name: MyString
nummer: 1
ws: false
ss: false
two:
name: MyString
nummer: 1
ws: false
ss: false

13
test/fixtures/studia.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
zahl: MyString
name: MyString
desc: MyText
typ: MyString
two:
zahl: MyString
name: MyString
desc: MyText
typ: MyString

9
test/fixtures/studmods.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
studium_id: 1
modul_id: 1
two:
studium_id: 1
modul_id: 1

11
test/fixtures/users.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.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

0
test/functional/.gitkeep Normal file
View File

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class LvasControllerTest < ActionController::TestCase
setup do
@lva = lvas(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:lvas)
end
test "should get new" do
get :new
assert_response :success
end
test "should create lva" do
assert_difference('Lva.count') do
post :create, lva: { desc: @lva.desc, ects: @lva.ects, lvanr: @lva.lvanr, name: @lva.name, stunden: @lva.stunden }
end
assert_redirected_to lva_path(assigns(:lva))
end
test "should show lva" do
get :show, id: @lva
assert_response :success
end
test "should get edit" do
get :edit, id: @lva
assert_response :success
end
test "should update lva" do
put :update, id: @lva, lva: { desc: @lva.desc, ects: @lva.ects, lvanr: @lva.lvanr, name: @lva.name, stunden: @lva.stunden }
assert_redirected_to lva_path(assigns(:lva))
end
test "should destroy lva" do
assert_difference('Lva.count', -1) do
delete :destroy, id: @lva
end
assert_redirected_to lvas_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class ModulgruppenControllerTest < ActionController::TestCase
setup do
@modulgruppe = modulgruppen(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:modulgruppen)
end
test "should get new" do
get :new
assert_response :success
end
test "should create modulgruppe" do
assert_difference('Modulgruppe.count') do
post :create, modulgruppe: { name: @modulgruppe.name, phase: @modulgruppe.phase, studium_id: @modulgruppe.studium_id, type: @modulgruppe.type }
end
assert_redirected_to modulgruppe_path(assigns(:modulgruppe))
end
test "should show modulgruppe" do
get :show, id: @modulgruppe
assert_response :success
end
test "should get edit" do
get :edit, id: @modulgruppe
assert_response :success
end
test "should update modulgruppe" do
put :update, id: @modulgruppe, modulgruppe: { name: @modulgruppe.name, phase: @modulgruppe.phase, studium_id: @modulgruppe.studium_id, type: @modulgruppe.type }
assert_redirected_to modulgruppe_path(assigns(:modulgruppe))
end
test "should destroy modulgruppe" do
assert_difference('Modulgruppe.count', -1) do
delete :destroy, id: @modulgruppe
end
assert_redirected_to modulgruppen_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class ModulsControllerTest < ActionController::TestCase
setup do
@modul = moduls(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:moduls)
end
test "should get new" do
get :new
assert_response :success
end
test "should create modul" do
assert_difference('Modul.count') do
post :create, modul: { desc: @modul.desc, name: @modul.name }
end
assert_redirected_to modul_path(assigns(:modul))
end
test "should show modul" do
get :show, id: @modul
assert_response :success
end
test "should get edit" do
get :edit, id: @modul
assert_response :success
end
test "should update modul" do
put :update, id: @modul, modul: { desc: @modul.desc, name: @modul.name }
assert_redirected_to modul_path(assigns(:modul))
end
test "should destroy modul" do
assert_difference('Modul.count', -1) do
delete :destroy, id: @modul
end
assert_redirected_to moduls_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class NeuigkeitenControllerTest < ActionController::TestCase
setup do
@neuigkeit = neuigkeiten(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:neuigkeiten)
end
test "should get new" do
get :new
assert_response :success
end
test "should create neuigkeit" do
assert_difference('Neuigkeit.count') do
post :create, neuigkeit: { datum: @neuigkeit.datum, text: @neuigkeit.text, title: @neuigkeit.title }
end
assert_redirected_to neuigkeit_path(assigns(:neuigkeit))
end
test "should show neuigkeit" do
get :show, id: @neuigkeit
assert_response :success
end
test "should get edit" do
get :edit, id: @neuigkeit
assert_response :success
end
test "should update neuigkeit" do
put :update, id: @neuigkeit, neuigkeit: { datum: @neuigkeit.datum, text: @neuigkeit.text, title: @neuigkeit.title }
assert_redirected_to neuigkeit_path(assigns(:neuigkeit))
end
test "should destroy neuigkeit" do
assert_difference('Neuigkeit.count', -1) do
delete :destroy, id: @neuigkeit
end
assert_redirected_to neuigkeiten_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class RubrikenControllerTest < ActionController::TestCase
setup do
@rubrik = rubriken(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:rubriken)
end
test "should get new" do
get :new
assert_response :success
end
test "should create rubrik" do
assert_difference('Rubrik.count') do
post :create, rubrik: { desc: @rubrik.desc, name: @rubrik.name, prio: @rubrik.prio }
end
assert_redirected_to rubrik_path(assigns(:rubrik))
end
test "should show rubrik" do
get :show, id: @rubrik
assert_response :success
end
test "should get edit" do
get :edit, id: @rubrik
assert_response :success
end
test "should update rubrik" do
put :update, id: @rubrik, rubrik: { desc: @rubrik.desc, name: @rubrik.name, prio: @rubrik.prio }
assert_redirected_to rubrik_path(assigns(:rubrik))
end
test "should destroy rubrik" do
assert_difference('Rubrik.count', -1) do
delete :destroy, id: @rubrik
end
assert_redirected_to rubriken_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class SemestersControllerTest < ActionController::TestCase
setup do
@semester = semesters(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:semesters)
end
test "should get new" do
get :new
assert_response :success
end
test "should create semester" do
assert_difference('Semester.count') do
post :create, semester: { name: @semester.name, nummer: @semester.nummer, ss: @semester.ss, ws: @semester.ws }
end
assert_redirected_to semester_path(assigns(:semester))
end
test "should show semester" do
get :show, id: @semester
assert_response :success
end
test "should get edit" do
get :edit, id: @semester
assert_response :success
end
test "should update semester" do
put :update, id: @semester, semester: { name: @semester.name, nummer: @semester.nummer, ss: @semester.ss, ws: @semester.ws }
assert_redirected_to semester_path(assigns(:semester))
end
test "should destroy semester" do
assert_difference('Semester.count', -1) do
delete :destroy, id: @semester
end
assert_redirected_to semesters_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class StudiaControllerTest < ActionController::TestCase
setup do
@studium = studia(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:studia)
end
test "should get new" do
get :new
assert_response :success
end
test "should create studium" do
assert_difference('Studium.count') do
post :create, studium: { desc: @studium.desc, name: @studium.name, typ: @studium.typ, zahl: @studium.zahl }
end
assert_redirected_to studium_path(assigns(:studium))
end
test "should show studium" do
get :show, id: @studium
assert_response :success
end
test "should get edit" do
get :edit, id: @studium
assert_response :success
end
test "should update studium" do
put :update, id: @studium, studium: { desc: @studium.desc, name: @studium.name, typ: @studium.typ, zahl: @studium.zahl }
assert_redirected_to studium_path(assigns(:studium))
end
test "should destroy studium" do
assert_difference('Studium.count', -1) do
delete :destroy, id: @studium
end
assert_redirected_to studia_path
end
end

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class StudmodsControllerTest < ActionController::TestCase
setup do
@studmod = studmods(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:studmods)
end
test "should get new" do
get :new
assert_response :success
end
test "should create studmod" do
assert_difference('Studmod.count') do
post :create, studmod: { modul_id: @studmod.modul_id, studium_id: @studmod.studium_id }
end
assert_redirected_to studmod_path(assigns(:studmod))
end
test "should show studmod" do
get :show, id: @studmod
assert_response :success
end
test "should get edit" do
get :edit, id: @studmod
assert_response :success
end
test "should update studmod" do
put :update, id: @studmod, studmod: { modul_id: @studmod.modul_id, studium_id: @studmod.studium_id }
assert_redirected_to studmod_path(assigns(:studmod))
end
test "should destroy studmod" do
assert_difference('Studmod.count', -1) do
delete :destroy, id: @studmod
end
assert_redirected_to studmods_path
end
end

View File

View File

@@ -0,0 +1,12 @@
require 'test_helper'
require 'rails/performance_test_help'
class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
# :output => 'tmp/performance', :formats => [:flat] }
def test_homepage
get '/'
end
end

13
test/test_helper.rb Normal file
View File

@@ -0,0 +1,13 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end

0
test/unit/.gitkeep Normal file
View File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

7
test/unit/lva_test.rb Normal file
View File

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

7
test/unit/modul_test.rb Normal file
View File

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

View File

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

View File

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

7
test/unit/rubrik_test.rb Normal file
View File

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

View File

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

View File

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

View File

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

7
test/unit/user_test.rb Normal file
View File

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