diff --git a/.geanyprojekt b/.geanyprojekt index a7afc66..abc039c 100644 --- a/.geanyprojekt +++ b/.geanyprojekt @@ -14,7 +14,7 @@ indent_mode=2 [project] name=fetsite -base_path=. +base_path=/home/andreas/www/fetsite description= file_patterns=*.rb;*.erb;*.js;*.coffee;*.sass;Gemfile; @@ -23,7 +23,35 @@ long_line_behaviour=1 long_line_column=72 [files] -current_page=0 +current_page=1 +FILE_NAME_0=29;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.html.erb;0;4 +FILE_NAME_1=58;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2F_tabs.html.erb;0;4 +FILE_NAME_2=1179;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fability.rb;0;4 +FILE_NAME_3=115;None;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.ics.erb;0;4 +FILE_NAME_4=454;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fusers_controller.rb;0;4 +FILE_NAME_5=571;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Fdevise.rb;0;4 +FILE_NAME_6=627;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fneuigkeit.rb;0;4 +FILE_NAME_7=421;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fmodulgruppe.rb;0;4 +FILE_NAME_8=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Flva.rb;0;4 +FILE_NAME_9=363;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fthema.rb;0;4 +FILE_NAME_10=255;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130124000300_translate_lvas.rb;0;4 +FILE_NAME_11=222;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818161841_translate_neuigkeiten.rb;0;4 +FILE_NAME_12=1383;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Finflections.rb;0;4 +FILE_NAME_13=1010;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 +FILE_NAME_14=615;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 +FILE_NAME_15=844;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 +FILE_NAME_16=114;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 +FILE_NAME_17=191;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805143719_create_themen.rb;0;4 +FILE_NAME_18=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130112110800_create_semesters.rb;0;4 +FILE_NAME_19=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130113160023_create_versions.rb;0;4 +FILE_NAME_20=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2Fshow.html.erb;0;4 +FILE_NAME_21=161;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2F_tabs.html.erb;0;4 +FILE_NAME_22=439;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fapplication.html.erb;0;4 +FILE_NAME_23=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fusers%2Findex.html.erb;0;4 +FILE_NAME_24=3143;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmoduls_controller.rb;0;4 +FILE_NAME_25=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fconfig_controller.rb;0;4 +FILE_NAME_26=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmodulgruppen_controller.rb;0;4 +FILE_NAME_27=783;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fmenu.html.erb;0;4 [gproject] source_patterns=*.rb;*.erb diff --git a/app/assets/javascripts/fetprofiles.js.coffee b/app/assets/javascripts/fetprofiles.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/fetprofiles.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/fetzneditions.js.coffee b/app/assets/javascripts/fetzneditions.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/fetzneditions.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/fotos.js.coffee b/app/assets/javascripts/fotos.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/fotos.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/galleries.js.coffee b/app/assets/javascripts/galleries.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/galleries.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/gremien.js.coffee b/app/assets/javascripts/gremien.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/gremien.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/memberships.js.coffee b/app/assets/javascripts/memberships.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/memberships.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/fetprofiles.css.scss b/app/assets/stylesheets/fetprofiles.css.scss new file mode 100644 index 0000000..03ed414 --- /dev/null +++ b/app/assets/stylesheets/fetprofiles.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the fetprofiles controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/fetzneditions.css.scss b/app/assets/stylesheets/fetzneditions.css.scss new file mode 100644 index 0000000..db1edb7 --- /dev/null +++ b/app/assets/stylesheets/fetzneditions.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the fetzneditions controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/fotos.css.scss b/app/assets/stylesheets/fotos.css.scss new file mode 100644 index 0000000..c853527 --- /dev/null +++ b/app/assets/stylesheets/fotos.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the fotos controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/galleries.css.scss b/app/assets/stylesheets/galleries.css.scss new file mode 100644 index 0000000..f88f6f2 --- /dev/null +++ b/app/assets/stylesheets/galleries.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the galleries controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/gremien.css.scss b/app/assets/stylesheets/gremien.css.scss new file mode 100644 index 0000000..4ae14e3 --- /dev/null +++ b/app/assets/stylesheets/gremien.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the gremien controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/memberships.css.scss b/app/assets/stylesheets/memberships.css.scss new file mode 100644 index 0000000..1544aad --- /dev/null +++ b/app/assets/stylesheets/memberships.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the memberships controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/fetprofiles_controller.rb b/app/controllers/fetprofiles_controller.rb new file mode 100644 index 0000000..08bcfa0 --- /dev/null +++ b/app/controllers/fetprofiles_controller.rb @@ -0,0 +1,83 @@ +class FetprofilesController < ApplicationController + # GET /fetprofiles + # GET /fetprofiles.json + def index + @fetprofiles = Fetprofile.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @fetprofiles } + end + end + + # GET /fetprofiles/1 + # GET /fetprofiles/1.json + def show + @fetprofile = Fetprofile.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @fetprofile } + end + end + + # GET /fetprofiles/new + # GET /fetprofiles/new.json + def new + @fetprofile = Fetprofile.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @fetprofile } + end + end + + # GET /fetprofiles/1/edit + def edit + @fetprofile = Fetprofile.find(params[:id]) + end + + # POST /fetprofiles + # POST /fetprofiles.json + def create + @fetprofile = Fetprofile.new(params[:fetprofile]) + + respond_to do |format| + if @fetprofile.save + format.html { redirect_to @fetprofile, notice: 'Fetprofile was successfully created.' } + format.json { render json: @fetprofile, status: :created, location: @fetprofile } + else + format.html { render action: "new" } + format.json { render json: @fetprofile.errors, status: :unprocessable_entity } + end + end + end + + # PUT /fetprofiles/1 + # PUT /fetprofiles/1.json + def update + @fetprofile = Fetprofile.find(params[:id]) + + respond_to do |format| + if @fetprofile.update_attributes(params[:fetprofile]) + format.html { redirect_to @fetprofile, notice: 'Fetprofile was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @fetprofile.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /fetprofiles/1 + # DELETE /fetprofiles/1.json + def destroy + @fetprofile = Fetprofile.find(params[:id]) + @fetprofile.destroy + + respond_to do |format| + format.html { redirect_to fetprofiles_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/fetzneditions_controller.rb b/app/controllers/fetzneditions_controller.rb new file mode 100644 index 0000000..7b2de9e --- /dev/null +++ b/app/controllers/fetzneditions_controller.rb @@ -0,0 +1,83 @@ +class FetzneditionsController < ApplicationController + # GET /fetzneditions + # GET /fetzneditions.json + def index + @fetzneditions = Fetznedition.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @fetzneditions } + end + end + + # GET /fetzneditions/1 + # GET /fetzneditions/1.json + def show + @fetznedition = Fetznedition.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @fetznedition } + end + end + + # GET /fetzneditions/new + # GET /fetzneditions/new.json + def new + @fetznedition = Fetznedition.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @fetznedition } + end + end + + # GET /fetzneditions/1/edit + def edit + @fetznedition = Fetznedition.find(params[:id]) + end + + # POST /fetzneditions + # POST /fetzneditions.json + def create + @fetznedition = Fetznedition.new(params[:fetznedition]) + + respond_to do |format| + if @fetznedition.save + format.html { redirect_to @fetznedition, notice: 'Fetznedition was successfully created.' } + format.json { render json: @fetznedition, status: :created, location: @fetznedition } + else + format.html { render action: "new" } + format.json { render json: @fetznedition.errors, status: :unprocessable_entity } + end + end + end + + # PUT /fetzneditions/1 + # PUT /fetzneditions/1.json + def update + @fetznedition = Fetznedition.find(params[:id]) + + respond_to do |format| + if @fetznedition.update_attributes(params[:fetznedition]) + format.html { redirect_to @fetznedition, notice: 'Fetznedition was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @fetznedition.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /fetzneditions/1 + # DELETE /fetzneditions/1.json + def destroy + @fetznedition = Fetznedition.find(params[:id]) + @fetznedition.destroy + + respond_to do |format| + format.html { redirect_to fetzneditions_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/fotos_controller.rb b/app/controllers/fotos_controller.rb new file mode 100644 index 0000000..591bf1f --- /dev/null +++ b/app/controllers/fotos_controller.rb @@ -0,0 +1,83 @@ +class FotosController < ApplicationController + # GET /fotos + # GET /fotos.json + def index + @fotos = Foto.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @fotos } + end + end + + # GET /fotos/1 + # GET /fotos/1.json + def show + @foto = Foto.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @foto } + end + end + + # GET /fotos/new + # GET /fotos/new.json + def new + @foto = Foto.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @foto } + end + end + + # GET /fotos/1/edit + def edit + @foto = Foto.find(params[:id]) + end + + # POST /fotos + # POST /fotos.json + def create + @foto = Foto.new(params[:foto]) + + respond_to do |format| + if @foto.save + format.html { redirect_to @foto, notice: 'Foto was successfully created.' } + format.json { render json: @foto, status: :created, location: @foto } + else + format.html { render action: "new" } + format.json { render json: @foto.errors, status: :unprocessable_entity } + end + end + end + + # PUT /fotos/1 + # PUT /fotos/1.json + def update + @foto = Foto.find(params[:id]) + + respond_to do |format| + if @foto.update_attributes(params[:foto]) + format.html { redirect_to @foto, notice: 'Foto was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @foto.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /fotos/1 + # DELETE /fotos/1.json + def destroy + @foto = Foto.find(params[:id]) + @foto.destroy + + respond_to do |format| + format.html { redirect_to fotos_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb new file mode 100644 index 0000000..8ebf183 --- /dev/null +++ b/app/controllers/galleries_controller.rb @@ -0,0 +1,83 @@ +class GalleriesController < ApplicationController + # GET /galleries + # GET /galleries.json + def index + @galleries = Gallery.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @galleries } + end + end + + # GET /galleries/1 + # GET /galleries/1.json + def show + @gallery = Gallery.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @gallery } + end + end + + # GET /galleries/new + # GET /galleries/new.json + def new + @gallery = Gallery.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @gallery } + end + end + + # GET /galleries/1/edit + def edit + @gallery = Gallery.find(params[:id]) + end + + # POST /galleries + # POST /galleries.json + def create + @gallery = Gallery.new(params[:gallery]) + + respond_to do |format| + if @gallery.save + format.html { redirect_to @gallery, notice: 'Gallery was successfully created.' } + format.json { render json: @gallery, status: :created, location: @gallery } + else + format.html { render action: "new" } + format.json { render json: @gallery.errors, status: :unprocessable_entity } + end + end + end + + # PUT /galleries/1 + # PUT /galleries/1.json + def update + @gallery = Gallery.find(params[:id]) + + respond_to do |format| + if @gallery.update_attributes(params[:gallery]) + format.html { redirect_to @gallery, notice: 'Gallery was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @gallery.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /galleries/1 + # DELETE /galleries/1.json + def destroy + @gallery = Gallery.find(params[:id]) + @gallery.destroy + + respond_to do |format| + format.html { redirect_to galleries_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/gremien_controller.rb b/app/controllers/gremien_controller.rb new file mode 100644 index 0000000..1c4dd38 --- /dev/null +++ b/app/controllers/gremien_controller.rb @@ -0,0 +1,83 @@ +class GremienController < ApplicationController + # GET /gremien + # GET /gremien.json + def index + @gremien = Gremium.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @gremien } + end + end + + # GET /gremien/1 + # GET /gremien/1.json + def show + @gremium = Gremium.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @gremium } + end + end + + # GET /gremien/new + # GET /gremien/new.json + def new + @gremium = Gremium.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @gremium } + end + end + + # GET /gremien/1/edit + def edit + @gremium = Gremium.find(params[:id]) + end + + # POST /gremien + # POST /gremien.json + def create + @gremium = Gremium.new(params[:gremium]) + + respond_to do |format| + if @gremium.save + format.html { redirect_to @gremium, notice: 'Gremium was successfully created.' } + format.json { render json: @gremium, status: :created, location: @gremium } + else + format.html { render action: "new" } + format.json { render json: @gremium.errors, status: :unprocessable_entity } + end + end + end + + # PUT /gremien/1 + # PUT /gremien/1.json + def update + @gremium = Gremium.find(params[:id]) + + respond_to do |format| + if @gremium.update_attributes(params[:gremium]) + format.html { redirect_to @gremium, notice: 'Gremium was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @gremium.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /gremien/1 + # DELETE /gremien/1.json + def destroy + @gremium = Gremium.find(params[:id]) + @gremium.destroy + + respond_to do |format| + format.html { redirect_to gremien_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/memberships_controller.rb b/app/controllers/memberships_controller.rb new file mode 100644 index 0000000..fa9c90c --- /dev/null +++ b/app/controllers/memberships_controller.rb @@ -0,0 +1,83 @@ +class MembershipsController < ApplicationController + # GET /memberships + # GET /memberships.json + def index + @memberships = Membership.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @memberships } + end + end + + # GET /memberships/1 + # GET /memberships/1.json + def show + @membership = Membership.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @membership } + end + end + + # GET /memberships/new + # GET /memberships/new.json + def new + @membership = Membership.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @membership } + end + end + + # GET /memberships/1/edit + def edit + @membership = Membership.find(params[:id]) + end + + # POST /memberships + # POST /memberships.json + def create + @membership = Membership.new(params[:membership]) + + respond_to do |format| + if @membership.save + format.html { redirect_to @membership, notice: 'Membership was successfully created.' } + format.json { render json: @membership, status: :created, location: @membership } + else + format.html { render action: "new" } + format.json { render json: @membership.errors, status: :unprocessable_entity } + end + end + end + + # PUT /memberships/1 + # PUT /memberships/1.json + def update + @membership = Membership.find(params[:id]) + + respond_to do |format| + if @membership.update_attributes(params[:membership]) + format.html { redirect_to @membership, notice: 'Membership was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @membership.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /memberships/1 + # DELETE /memberships/1.json + def destroy + @membership = Membership.find(params[:id]) + @membership.destroy + + respond_to do |format| + format.html { redirect_to memberships_url } + format.json { head :no_content } + end + end +end diff --git a/app/helpers/fetprofiles_helper.rb b/app/helpers/fetprofiles_helper.rb new file mode 100644 index 0000000..76c535c --- /dev/null +++ b/app/helpers/fetprofiles_helper.rb @@ -0,0 +1,2 @@ +module FetprofilesHelper +end diff --git a/app/helpers/fetzneditions_helper.rb b/app/helpers/fetzneditions_helper.rb new file mode 100644 index 0000000..ce72cd3 --- /dev/null +++ b/app/helpers/fetzneditions_helper.rb @@ -0,0 +1,2 @@ +module FetzneditionsHelper +end diff --git a/app/helpers/fotos_helper.rb b/app/helpers/fotos_helper.rb new file mode 100644 index 0000000..1cc5af9 --- /dev/null +++ b/app/helpers/fotos_helper.rb @@ -0,0 +1,2 @@ +module FotosHelper +end diff --git a/app/helpers/galleries_helper.rb b/app/helpers/galleries_helper.rb new file mode 100644 index 0000000..2d7ca91 --- /dev/null +++ b/app/helpers/galleries_helper.rb @@ -0,0 +1,2 @@ +module GalleriesHelper +end diff --git a/app/helpers/gremien_helper.rb b/app/helpers/gremien_helper.rb new file mode 100644 index 0000000..98cbd7c --- /dev/null +++ b/app/helpers/gremien_helper.rb @@ -0,0 +1,2 @@ +module GremienHelper +end diff --git a/app/helpers/memberships_helper.rb b/app/helpers/memberships_helper.rb new file mode 100644 index 0000000..eaf43c7 --- /dev/null +++ b/app/helpers/memberships_helper.rb @@ -0,0 +1,2 @@ +module MembershipsHelper +end diff --git a/app/models/ability.rb b/app/models/ability.rb index 285bcba..293df62 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -27,7 +27,7 @@ class Ability # For Debug allow everything # Remove this line in production environment and for testing user management - can :manage, :all + # can :manage, :all can :addfetuser, User can :addfetadmin, User can [:show, :index], Studium @@ -62,7 +62,7 @@ class Ability if user.has_role?("newsadmin") || user.has_role?("fetadmin") can :addmoderator, Rubrik - end + end can [:show, :index], [Rubrik,Neuigkeit] if user.has_role?("newsadmin") || user.has_role?( "fetadmin") || user.has_role?( "fetuser") can :manage, Rubrik diff --git a/app/models/fetprofile.rb b/app/models/fetprofile.rb new file mode 100644 index 0000000..34ae476 --- /dev/null +++ b/app/models/fetprofile.rb @@ -0,0 +1,3 @@ +class Fetprofile < ActiveRecord::Base + attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname +end diff --git a/app/models/fetznedition.rb b/app/models/fetznedition.rb new file mode 100644 index 0000000..ff3046d --- /dev/null +++ b/app/models/fetznedition.rb @@ -0,0 +1,3 @@ +class Fetznedition < ActiveRecord::Base + attr_accessible :datei, :datum, :desc, :title +end diff --git a/app/models/foto.rb b/app/models/foto.rb new file mode 100644 index 0000000..08a5d59 --- /dev/null +++ b/app/models/foto.rb @@ -0,0 +1,3 @@ +class Foto < ActiveRecord::Base + attr_accessible :datei, :desc, :gallery_id, :title +end diff --git a/app/models/gallery.rb b/app/models/gallery.rb new file mode 100644 index 0000000..746a1d1 --- /dev/null +++ b/app/models/gallery.rb @@ -0,0 +1,3 @@ +class Gallery < ActiveRecord::Base + attr_accessible :datum, :desc, :name +end diff --git a/app/models/gremium.rb b/app/models/gremium.rb new file mode 100644 index 0000000..3c0bfae --- /dev/null +++ b/app/models/gremium.rb @@ -0,0 +1,3 @@ +class Gremium < ActiveRecord::Base + attr_accessible :desc, :name, :typ +end diff --git a/app/models/membership.rb b/app/models/membership.rb new file mode 100644 index 0000000..701d603 --- /dev/null +++ b/app/models/membership.rb @@ -0,0 +1,3 @@ +class Membership < ActiveRecord::Base + attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ +end diff --git a/app/views/fetprofiles/_form.html.erb b/app/views/fetprofiles/_form.html.erb new file mode 100644 index 0000000..016e4cf --- /dev/null +++ b/app/views/fetprofiles/_form.html.erb @@ -0,0 +1,15 @@ +<%= semantic_form_for @fetprofile do |f| %> + <%= f.inputs do %> + <%= f.input :vorname %> + <%= f.input :nachname %> + <%= f.input :short %> + <%= f.input :fetmailalias %> + <%= f.input :desc %> + <%= f.input :picture %> + <%= f.input :active %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/fetprofiles/edit.html.erb b/app/views/fetprofiles/edit.html.erb new file mode 100644 index 0000000..c2d79e3 --- /dev/null +++ b/app/views/fetprofiles/edit.html.erb @@ -0,0 +1,6 @@ +

Editing fetprofile

+ +<%= render 'form' %> + +<%= link_to 'Show', @fetprofile %> | +<%= link_to 'Back', fetprofiles_path %> diff --git a/app/views/fetprofiles/index.html.erb b/app/views/fetprofiles/index.html.erb new file mode 100644 index 0000000..133fc40 --- /dev/null +++ b/app/views/fetprofiles/index.html.erb @@ -0,0 +1,35 @@ +

Listing fetprofiles

+ + + + + + + + + + + + + + + +<% @fetprofiles.each do |fetprofile| %> + + + + + + + + + + + + +<% end %> +
VornameNachnameShortFetmailaliasDescPictureActive
<%= fetprofile.vorname %><%= fetprofile.nachname %><%= fetprofile.short %><%= fetprofile.fetmailalias %><%= fetprofile.desc %><%= fetprofile.picture %><%= fetprofile.active %><%= link_to 'Show', fetprofile %><%= link_to 'Edit', edit_fetprofile_path(fetprofile) %><%= link_to 'Destroy', fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Fetprofile', new_fetprofile_path %> diff --git a/app/views/fetprofiles/new.html.erb b/app/views/fetprofiles/new.html.erb new file mode 100644 index 0000000..94b4554 --- /dev/null +++ b/app/views/fetprofiles/new.html.erb @@ -0,0 +1,5 @@ +

New fetprofile

+ +<%= render 'form' %> + +<%= link_to 'Back', fetprofiles_path %> diff --git a/app/views/fetprofiles/show.html.erb b/app/views/fetprofiles/show.html.erb new file mode 100644 index 0000000..c11f77e --- /dev/null +++ b/app/views/fetprofiles/show.html.erb @@ -0,0 +1,40 @@ +

<%= notice %>

+ +

+ Vorname: + <%= @fetprofile.vorname %> +

+ +

+ Nachname: + <%= @fetprofile.nachname %> +

+ +

+ Short: + <%= @fetprofile.short %> +

+ +

+ Fetmailalias: + <%= @fetprofile.fetmailalias %> +

+ +

+ Desc: + <%= @fetprofile.desc %> +

+ +

+ Picture: + <%= @fetprofile.picture %> +

+ +

+ Active: + <%= @fetprofile.active %> +

+ + +<%= link_to 'Edit', edit_fetprofile_path(@fetprofile) %> | +<%= link_to 'Back', fetprofiles_path %> diff --git a/app/views/fetzneditions/_form.html.erb b/app/views/fetzneditions/_form.html.erb new file mode 100644 index 0000000..217516a --- /dev/null +++ b/app/views/fetzneditions/_form.html.erb @@ -0,0 +1,12 @@ +<%= semantic_form_for @fetznedition do |f| %> + <%= f.inputs do %> + <%= f.input :title %> + <%= f.input :desc %> + <%= f.input :datum %> + <%= f.input :datei %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/fetzneditions/edit.html.erb b/app/views/fetzneditions/edit.html.erb new file mode 100644 index 0000000..5fe0203 --- /dev/null +++ b/app/views/fetzneditions/edit.html.erb @@ -0,0 +1,6 @@ +

Editing fetznedition

+ +<%= render 'form' %> + +<%= link_to 'Show', @fetznedition %> | +<%= link_to 'Back', fetzneditions_path %> diff --git a/app/views/fetzneditions/index.html.erb b/app/views/fetzneditions/index.html.erb new file mode 100644 index 0000000..472810a --- /dev/null +++ b/app/views/fetzneditions/index.html.erb @@ -0,0 +1,29 @@ +

Listing fetzneditions

+ + + + + + + + + + + + +<% @fetzneditions.each do |fetznedition| %> + + + + + + + + + +<% end %> +
TitleDescDatumDatei
<%= fetznedition.title %><%= fetznedition.desc %><%= fetznedition.datum %><%= fetznedition.datei %><%= link_to 'Show', fetznedition %><%= link_to 'Edit', edit_fetznedition_path(fetznedition) %><%= link_to 'Destroy', fetznedition, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Fetznedition', new_fetznedition_path %> diff --git a/app/views/fetzneditions/new.html.erb b/app/views/fetzneditions/new.html.erb new file mode 100644 index 0000000..51e30e3 --- /dev/null +++ b/app/views/fetzneditions/new.html.erb @@ -0,0 +1,5 @@ +

New fetznedition

+ +<%= render 'form' %> + +<%= link_to 'Back', fetzneditions_path %> diff --git a/app/views/fetzneditions/show.html.erb b/app/views/fetzneditions/show.html.erb new file mode 100644 index 0000000..33f1cf1 --- /dev/null +++ b/app/views/fetzneditions/show.html.erb @@ -0,0 +1,25 @@ +

<%= notice %>

+ +

+ Title: + <%= @fetznedition.title %> +

+ +

+ Desc: + <%= @fetznedition.desc %> +

+ +

+ Datum: + <%= @fetznedition.datum %> +

+ +

+ Datei: + <%= @fetznedition.datei %> +

+ + +<%= link_to 'Edit', edit_fetznedition_path(@fetznedition) %> | +<%= link_to 'Back', fetzneditions_path %> diff --git a/app/views/fotos/_form.html.erb b/app/views/fotos/_form.html.erb new file mode 100644 index 0000000..9d1bf6e --- /dev/null +++ b/app/views/fotos/_form.html.erb @@ -0,0 +1,12 @@ +<%= semantic_form_for @foto do |f| %> + <%= f.inputs do %> + <%= f.input :title %> + <%= f.input :desc %> + <%= f.input :gallery_id %> + <%= f.input :datei %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/fotos/edit.html.erb b/app/views/fotos/edit.html.erb new file mode 100644 index 0000000..32e219a --- /dev/null +++ b/app/views/fotos/edit.html.erb @@ -0,0 +1,6 @@ +

Editing foto

+ +<%= render 'form' %> + +<%= link_to 'Show', @foto %> | +<%= link_to 'Back', fotos_path %> diff --git a/app/views/fotos/index.html.erb b/app/views/fotos/index.html.erb new file mode 100644 index 0000000..6521be0 --- /dev/null +++ b/app/views/fotos/index.html.erb @@ -0,0 +1,29 @@ +

Listing fotos

+ + + + + + + + + + + + +<% @fotos.each do |foto| %> + + + + + + + + + +<% end %> +
TitleDescGalleryDatei
<%= foto.title %><%= foto.desc %><%= foto.gallery_id %><%= foto.datei %><%= link_to 'Show', foto %><%= link_to 'Edit', edit_foto_path(foto) %><%= link_to 'Destroy', foto, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Foto', new_foto_path %> diff --git a/app/views/fotos/new.html.erb b/app/views/fotos/new.html.erb new file mode 100644 index 0000000..a76f8c8 --- /dev/null +++ b/app/views/fotos/new.html.erb @@ -0,0 +1,5 @@ +

New foto

+ +<%= render 'form' %> + +<%= link_to 'Back', fotos_path %> diff --git a/app/views/fotos/show.html.erb b/app/views/fotos/show.html.erb new file mode 100644 index 0000000..2a4c611 --- /dev/null +++ b/app/views/fotos/show.html.erb @@ -0,0 +1,25 @@ +

<%= notice %>

+ +

+ Title: + <%= @foto.title %> +

+ +

+ Desc: + <%= @foto.desc %> +

+ +

+ Gallery: + <%= @foto.gallery_id %> +

+ +

+ Datei: + <%= @foto.datei %> +

+ + +<%= link_to 'Edit', edit_foto_path(@foto) %> | +<%= link_to 'Back', fotos_path %> diff --git a/app/views/galleries/_form.html.erb b/app/views/galleries/_form.html.erb new file mode 100644 index 0000000..6322dc2 --- /dev/null +++ b/app/views/galleries/_form.html.erb @@ -0,0 +1,11 @@ +<%= semantic_form_for @gallery do |f| %> + <%= f.inputs do %> + <%= f.input :name %> + <%= f.input :desc %> + <%= f.input :datum %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/galleries/edit.html.erb b/app/views/galleries/edit.html.erb new file mode 100644 index 0000000..8c9cef9 --- /dev/null +++ b/app/views/galleries/edit.html.erb @@ -0,0 +1,6 @@ +

Editing gallery

+ +<%= render 'form' %> + +<%= link_to 'Show', @gallery %> | +<%= link_to 'Back', galleries_path %> diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb new file mode 100644 index 0000000..562128c --- /dev/null +++ b/app/views/galleries/index.html.erb @@ -0,0 +1,27 @@ +

Listing galleries

+ + + + + + + + + + + +<% @galleries.each do |gallery| %> + + + + + + + + +<% end %> +
NameDescDatum
<%= gallery.name %><%= gallery.desc %><%= gallery.datum %><%= link_to 'Show', gallery %><%= link_to 'Edit', edit_gallery_path(gallery) %><%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Gallery', new_gallery_path %> diff --git a/app/views/galleries/new.html.erb b/app/views/galleries/new.html.erb new file mode 100644 index 0000000..a224971 --- /dev/null +++ b/app/views/galleries/new.html.erb @@ -0,0 +1,5 @@ +

New gallery

+ +<%= render 'form' %> + +<%= link_to 'Back', galleries_path %> diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb new file mode 100644 index 0000000..2fa130b --- /dev/null +++ b/app/views/galleries/show.html.erb @@ -0,0 +1,20 @@ +

<%= notice %>

+ +

+ Name: + <%= @gallery.name %> +

+ +

+ Desc: + <%= @gallery.desc %> +

+ +

+ Datum: + <%= @gallery.datum %> +

+ + +<%= link_to 'Edit', edit_gallery_path(@gallery) %> | +<%= link_to 'Back', galleries_path %> diff --git a/app/views/gremien/_form.html.erb b/app/views/gremien/_form.html.erb new file mode 100644 index 0000000..5387d3b --- /dev/null +++ b/app/views/gremien/_form.html.erb @@ -0,0 +1,11 @@ +<%= semantic_form_for @gremium do |f| %> + <%= f.inputs do %> + <%= f.input :name %> + <%= f.input :desc %> + <%= f.input :typ %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/gremien/edit.html.erb b/app/views/gremien/edit.html.erb new file mode 100644 index 0000000..2e754a5 --- /dev/null +++ b/app/views/gremien/edit.html.erb @@ -0,0 +1,6 @@ +

Editing gremium

+ +<%= render 'form' %> + +<%= link_to 'Show', @gremium %> | +<%= link_to 'Back', gremien_path %> diff --git a/app/views/gremien/index.html.erb b/app/views/gremien/index.html.erb new file mode 100644 index 0000000..99309c1 --- /dev/null +++ b/app/views/gremien/index.html.erb @@ -0,0 +1,27 @@ +

Listing gremien

+ + + + + + + + + + + +<% @gremien.each do |gremium| %> + + + + + + + + +<% end %> +
NameDescTyp
<%= gremium.name %><%= gremium.desc %><%= gremium.typ %><%= link_to 'Show', gremium %><%= link_to 'Edit', edit_gremium_path(gremium) %><%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Gremium', new_gremium_path %> diff --git a/app/views/gremien/new.html.erb b/app/views/gremien/new.html.erb new file mode 100644 index 0000000..e61f0d3 --- /dev/null +++ b/app/views/gremien/new.html.erb @@ -0,0 +1,5 @@ +

New gremium

+ +<%= render 'form' %> + +<%= link_to 'Back', gremien_path %> diff --git a/app/views/gremien/show.html.erb b/app/views/gremien/show.html.erb new file mode 100644 index 0000000..4e8d5e7 --- /dev/null +++ b/app/views/gremien/show.html.erb @@ -0,0 +1,20 @@ +

<%= notice %>

+ +

+ Name: + <%= @gremium.name %> +

+ +

+ Desc: + <%= @gremium.desc %> +

+ +

+ Typ: + <%= @gremium.typ %> +

+ + +<%= link_to 'Edit', edit_gremium_path(@gremium) %> | +<%= link_to 'Back', gremien_path %> diff --git a/app/views/memberships/_form.html.erb b/app/views/memberships/_form.html.erb new file mode 100644 index 0000000..15bbe9a --- /dev/null +++ b/app/views/memberships/_form.html.erb @@ -0,0 +1,13 @@ +<%= semantic_form_for @membership do |f| %> + <%= f.inputs do %> + <%= f.input :fetprofile_id %> + <%= f.input :gremium_id %> + <%= f.input :start %> + <%= f.input :stop %> + <%= f.input :typ %> + <% end %> + + <%= f.actions do %> + <%= f.action :submit, :as => :input %> + <% end %> +<% end %> diff --git a/app/views/memberships/edit.html.erb b/app/views/memberships/edit.html.erb new file mode 100644 index 0000000..84851bd --- /dev/null +++ b/app/views/memberships/edit.html.erb @@ -0,0 +1,6 @@ +

Editing membership

+ +<%= render 'form' %> + +<%= link_to 'Show', @membership %> | +<%= link_to 'Back', memberships_path %> diff --git a/app/views/memberships/index.html.erb b/app/views/memberships/index.html.erb new file mode 100644 index 0000000..2a5e5ff --- /dev/null +++ b/app/views/memberships/index.html.erb @@ -0,0 +1,31 @@ +

Listing memberships

+ + + + + + + + + + + + + +<% @memberships.each do |membership| %> + + + + + + + + + + +<% end %> +
FetprofileGremiumStartStopTyp
<%= membership.fetprofile_id %><%= membership.gremium_id %><%= membership.start %><%= membership.stop %><%= membership.typ %><%= link_to 'Show', membership %><%= link_to 'Edit', edit_membership_path(membership) %><%= link_to 'Destroy', membership, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Membership', new_membership_path %> diff --git a/app/views/memberships/new.html.erb b/app/views/memberships/new.html.erb new file mode 100644 index 0000000..13dc6ad --- /dev/null +++ b/app/views/memberships/new.html.erb @@ -0,0 +1,5 @@ +

New membership

+ +<%= render 'form' %> + +<%= link_to 'Back', memberships_path %> diff --git a/app/views/memberships/show.html.erb b/app/views/memberships/show.html.erb new file mode 100644 index 0000000..e64ca53 --- /dev/null +++ b/app/views/memberships/show.html.erb @@ -0,0 +1,30 @@ +

<%= notice %>

+ +

+ Fetprofile: + <%= @membership.fetprofile_id %> +

+ +

+ Gremium: + <%= @membership.gremium_id %> +

+ +

+ Start: + <%= @membership.start %> +

+ +

+ Stop: + <%= @membership.stop %> +

+ +

+ Typ: + <%= @membership.typ %> +

+ + +<%= link_to 'Edit', edit_membership_path(@membership) %> | +<%= link_to 'Back', memberships_path %> diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index b9df975..c19ccce 100755 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -34,4 +34,8 @@ inflect.irregular 'thema', 'themen' inflect.plural 'frage', 'fragen' inflect.singular 'fragen', 'frage' inflect.irregular 'frage', 'fragen' +inflect.singular 'gremien', 'gremium' +inflect.irregular 'gremium', 'gremien' +inflect.plural 'gremium', 'gremien' + end diff --git a/config/routes.rb b/config/routes.rb index df3ad2f..3301633 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,4 @@ Fetsite::Application.routes.draw do - - resources :lecturers - devise_for :users resources :home, :only=>[:index] @@ -37,6 +34,25 @@ end get 'verwalten/studien', :controller=>:studien, :action=>:verwalten, :as=>'studien_verwalten' + + + resources :fetzneditions + + + resources :fotos + + + resources :galleries + + + resources :memberships + + + resources :gremien + + + resources :fetprofiles + resources :lecturers resources :semesters resources :moduls @@ -56,14 +72,14 @@ get 'home/startdev', :controller=>:home, :action=>:startdev, :as=>'home_startdev' resources :beispiele resources :themen - resources :themengruppen do - resources :themen, :only=>[:new, :show] - end - - resources :calendars - get 'verwalten/calendars', :controller=>:calendars, :action=>:verwalten, :as=>'calendars_verwalten' + resources :themengruppen do + resources :themen, :only=>[:new, :show] + end - resources :calentries + resources :calendars + get 'verwalten/calendars', :controller=>:calendars, :action=>:verwalten, :as=>'calendars_verwalten' + + resources :calentries end # The priority is based upon order of creation: diff --git a/db/migrate/20130115110100_translate_studien.rb b/db/migrate/20130115110100_translate_studien.rb index 3b8791b..1b412a5 100755 --- a/db/migrate/20130115110100_translate_studien.rb +++ b/db/migrate/20130115110100_translate_studien.rb @@ -4,14 +4,13 @@ class TranslateStudien < ActiveRecord::Migration :desc => :text, :shortdesc => :text }, { - #:migrate_data => true + :migrate_data => true }) - add_column :studium_translations, :studien_id, :integer - remove_column :studium_translations, :studium_id + end def self.down - Studium.drop_translation_table! #:migrate_data => true + Studium.drop_translation_table! :migrate_data => true end -end \ No newline at end of file +end diff --git a/db/migrate/20130819133257_create_fetprofiles.rb b/db/migrate/20130819133257_create_fetprofiles.rb new file mode 100644 index 0000000..458bde3 --- /dev/null +++ b/db/migrate/20130819133257_create_fetprofiles.rb @@ -0,0 +1,15 @@ +class CreateFetprofiles < ActiveRecord::Migration + def change + create_table :fetprofiles do |t| + t.string :vorname + t.string :nachname + t.string :short + t.string :fetmailalias + t.text :desc + t.string :picture + t.boolean :active + + t.timestamps + end + end +end diff --git a/db/migrate/20130819133330_create_gremien.rb b/db/migrate/20130819133330_create_gremien.rb new file mode 100644 index 0000000..0ef2ee6 --- /dev/null +++ b/db/migrate/20130819133330_create_gremien.rb @@ -0,0 +1,11 @@ +class CreateGremien < ActiveRecord::Migration + def change + create_table :gremien do |t| + t.string :name + t.text :desc + t.string :typ + + t.timestamps + end + end +end diff --git a/db/migrate/20130819133446_create_memberships.rb b/db/migrate/20130819133446_create_memberships.rb new file mode 100644 index 0000000..89f4698 --- /dev/null +++ b/db/migrate/20130819133446_create_memberships.rb @@ -0,0 +1,13 @@ +class CreateMemberships < ActiveRecord::Migration + def change + create_table :memberships do |t| + t.string :fetprofile_id + t.string :gremium_id + t.date :start + t.date :stop + t.string :typ + + t.timestamps + end + end +end diff --git a/db/migrate/20130819133607_create_galleries.rb b/db/migrate/20130819133607_create_galleries.rb new file mode 100644 index 0000000..b198006 --- /dev/null +++ b/db/migrate/20130819133607_create_galleries.rb @@ -0,0 +1,11 @@ +class CreateGalleries < ActiveRecord::Migration + def change + create_table :galleries do |t| + t.string :name + t.text :desc + t.date :datum + + t.timestamps + end + end +end diff --git a/db/migrate/20130819133729_create_fotos.rb b/db/migrate/20130819133729_create_fotos.rb new file mode 100644 index 0000000..6d2a071 --- /dev/null +++ b/db/migrate/20130819133729_create_fotos.rb @@ -0,0 +1,12 @@ +class CreateFotos < ActiveRecord::Migration + def change + create_table :fotos do |t| + t.string :title + t.text :desc + t.integer :gallery_id + t.string :datei + + t.timestamps + end + end +end diff --git a/db/migrate/20130819134132_create_fetzneditions.rb b/db/migrate/20130819134132_create_fetzneditions.rb new file mode 100644 index 0000000..6246627 --- /dev/null +++ b/db/migrate/20130819134132_create_fetzneditions.rb @@ -0,0 +1,12 @@ +class CreateFetzneditions < ActiveRecord::Migration + def change + create_table :fetzneditions do |t| + t.string :title + t.text :desc + t.date :datum + t.string :datei + + t.timestamps + end + end +end diff --git a/spec/controllers/fetprofiles_controller_spec.rb b/spec/controllers/fetprofiles_controller_spec.rb new file mode 100644 index 0000000..be40005 --- /dev/null +++ b/spec/controllers/fetprofiles_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe FetprofilesController do + + # This should return the minimal set of attributes required to create a valid + # Fetprofile. As you add validations to Fetprofile, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "vorname" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # FetprofilesController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all fetprofiles as @fetprofiles" do + fetprofile = Fetprofile.create! valid_attributes + get :index, {}, valid_session + assigns(:fetprofiles).should eq([fetprofile]) + end + end + + describe "GET show" do + it "assigns the requested fetprofile as @fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + get :show, {:id => fetprofile.to_param}, valid_session + assigns(:fetprofile).should eq(fetprofile) + end + end + + describe "GET new" do + it "assigns a new fetprofile as @fetprofile" do + get :new, {}, valid_session + assigns(:fetprofile).should be_a_new(Fetprofile) + end + end + + describe "GET edit" do + it "assigns the requested fetprofile as @fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + get :edit, {:id => fetprofile.to_param}, valid_session + assigns(:fetprofile).should eq(fetprofile) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Fetprofile" do + expect { + post :create, {:fetprofile => valid_attributes}, valid_session + }.to change(Fetprofile, :count).by(1) + end + + it "assigns a newly created fetprofile as @fetprofile" do + post :create, {:fetprofile => valid_attributes}, valid_session + assigns(:fetprofile).should be_a(Fetprofile) + assigns(:fetprofile).should be_persisted + end + + it "redirects to the created fetprofile" do + post :create, {:fetprofile => valid_attributes}, valid_session + response.should redirect_to(Fetprofile.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved fetprofile as @fetprofile" do + # Trigger the behavior that occurs when invalid params are submitted + Fetprofile.any_instance.stub(:save).and_return(false) + post :create, {:fetprofile => { "vorname" => "invalid value" }}, valid_session + assigns(:fetprofile).should be_a_new(Fetprofile) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Fetprofile.any_instance.stub(:save).and_return(false) + post :create, {:fetprofile => { "vorname" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + # Assuming there are no other fetprofiles in the database, this + # specifies that the Fetprofile created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Fetprofile.any_instance.should_receive(:update_attributes).with({ "vorname" => "MyString" }) + put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "MyString" }}, valid_session + end + + it "assigns the requested fetprofile as @fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + put :update, {:id => fetprofile.to_param, :fetprofile => valid_attributes}, valid_session + assigns(:fetprofile).should eq(fetprofile) + end + + it "redirects to the fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + put :update, {:id => fetprofile.to_param, :fetprofile => valid_attributes}, valid_session + response.should redirect_to(fetprofile) + end + end + + describe "with invalid params" do + it "assigns the fetprofile as @fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Fetprofile.any_instance.stub(:save).and_return(false) + put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "invalid value" }}, valid_session + assigns(:fetprofile).should eq(fetprofile) + end + + it "re-renders the 'edit' template" do + fetprofile = Fetprofile.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Fetprofile.any_instance.stub(:save).and_return(false) + put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested fetprofile" do + fetprofile = Fetprofile.create! valid_attributes + expect { + delete :destroy, {:id => fetprofile.to_param}, valid_session + }.to change(Fetprofile, :count).by(-1) + end + + it "redirects to the fetprofiles list" do + fetprofile = Fetprofile.create! valid_attributes + delete :destroy, {:id => fetprofile.to_param}, valid_session + response.should redirect_to(fetprofiles_url) + end + end + +end diff --git a/spec/controllers/fetzneditions_controller_spec.rb b/spec/controllers/fetzneditions_controller_spec.rb new file mode 100644 index 0000000..9f5662f --- /dev/null +++ b/spec/controllers/fetzneditions_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe FetzneditionsController do + + # This should return the minimal set of attributes required to create a valid + # Fetznedition. As you add validations to Fetznedition, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "title" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # FetzneditionsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all fetzneditions as @fetzneditions" do + fetznedition = Fetznedition.create! valid_attributes + get :index, {}, valid_session + assigns(:fetzneditions).should eq([fetznedition]) + end + end + + describe "GET show" do + it "assigns the requested fetznedition as @fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + get :show, {:id => fetznedition.to_param}, valid_session + assigns(:fetznedition).should eq(fetznedition) + end + end + + describe "GET new" do + it "assigns a new fetznedition as @fetznedition" do + get :new, {}, valid_session + assigns(:fetznedition).should be_a_new(Fetznedition) + end + end + + describe "GET edit" do + it "assigns the requested fetznedition as @fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + get :edit, {:id => fetznedition.to_param}, valid_session + assigns(:fetznedition).should eq(fetznedition) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Fetznedition" do + expect { + post :create, {:fetznedition => valid_attributes}, valid_session + }.to change(Fetznedition, :count).by(1) + end + + it "assigns a newly created fetznedition as @fetznedition" do + post :create, {:fetznedition => valid_attributes}, valid_session + assigns(:fetznedition).should be_a(Fetznedition) + assigns(:fetznedition).should be_persisted + end + + it "redirects to the created fetznedition" do + post :create, {:fetznedition => valid_attributes}, valid_session + response.should redirect_to(Fetznedition.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved fetznedition as @fetznedition" do + # Trigger the behavior that occurs when invalid params are submitted + Fetznedition.any_instance.stub(:save).and_return(false) + post :create, {:fetznedition => { "title" => "invalid value" }}, valid_session + assigns(:fetznedition).should be_a_new(Fetznedition) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Fetznedition.any_instance.stub(:save).and_return(false) + post :create, {:fetznedition => { "title" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + # Assuming there are no other fetzneditions in the database, this + # specifies that the Fetznedition created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Fetznedition.any_instance.should_receive(:update_attributes).with({ "title" => "MyString" }) + put :update, {:id => fetznedition.to_param, :fetznedition => { "title" => "MyString" }}, valid_session + end + + it "assigns the requested fetznedition as @fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + put :update, {:id => fetznedition.to_param, :fetznedition => valid_attributes}, valid_session + assigns(:fetznedition).should eq(fetznedition) + end + + it "redirects to the fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + put :update, {:id => fetznedition.to_param, :fetznedition => valid_attributes}, valid_session + response.should redirect_to(fetznedition) + end + end + + describe "with invalid params" do + it "assigns the fetznedition as @fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Fetznedition.any_instance.stub(:save).and_return(false) + put :update, {:id => fetznedition.to_param, :fetznedition => { "title" => "invalid value" }}, valid_session + assigns(:fetznedition).should eq(fetznedition) + end + + it "re-renders the 'edit' template" do + fetznedition = Fetznedition.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Fetznedition.any_instance.stub(:save).and_return(false) + put :update, {:id => fetznedition.to_param, :fetznedition => { "title" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested fetznedition" do + fetznedition = Fetznedition.create! valid_attributes + expect { + delete :destroy, {:id => fetznedition.to_param}, valid_session + }.to change(Fetznedition, :count).by(-1) + end + + it "redirects to the fetzneditions list" do + fetznedition = Fetznedition.create! valid_attributes + delete :destroy, {:id => fetznedition.to_param}, valid_session + response.should redirect_to(fetzneditions_url) + end + end + +end diff --git a/spec/controllers/fotos_controller_spec.rb b/spec/controllers/fotos_controller_spec.rb new file mode 100644 index 0000000..f993da7 --- /dev/null +++ b/spec/controllers/fotos_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe FotosController do + + # This should return the minimal set of attributes required to create a valid + # Foto. As you add validations to Foto, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "title" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # FotosController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all fotos as @fotos" do + foto = Foto.create! valid_attributes + get :index, {}, valid_session + assigns(:fotos).should eq([foto]) + end + end + + describe "GET show" do + it "assigns the requested foto as @foto" do + foto = Foto.create! valid_attributes + get :show, {:id => foto.to_param}, valid_session + assigns(:foto).should eq(foto) + end + end + + describe "GET new" do + it "assigns a new foto as @foto" do + get :new, {}, valid_session + assigns(:foto).should be_a_new(Foto) + end + end + + describe "GET edit" do + it "assigns the requested foto as @foto" do + foto = Foto.create! valid_attributes + get :edit, {:id => foto.to_param}, valid_session + assigns(:foto).should eq(foto) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Foto" do + expect { + post :create, {:foto => valid_attributes}, valid_session + }.to change(Foto, :count).by(1) + end + + it "assigns a newly created foto as @foto" do + post :create, {:foto => valid_attributes}, valid_session + assigns(:foto).should be_a(Foto) + assigns(:foto).should be_persisted + end + + it "redirects to the created foto" do + post :create, {:foto => valid_attributes}, valid_session + response.should redirect_to(Foto.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved foto as @foto" do + # Trigger the behavior that occurs when invalid params are submitted + Foto.any_instance.stub(:save).and_return(false) + post :create, {:foto => { "title" => "invalid value" }}, valid_session + assigns(:foto).should be_a_new(Foto) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Foto.any_instance.stub(:save).and_return(false) + post :create, {:foto => { "title" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested foto" do + foto = Foto.create! valid_attributes + # Assuming there are no other fotos in the database, this + # specifies that the Foto created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Foto.any_instance.should_receive(:update_attributes).with({ "title" => "MyString" }) + put :update, {:id => foto.to_param, :foto => { "title" => "MyString" }}, valid_session + end + + it "assigns the requested foto as @foto" do + foto = Foto.create! valid_attributes + put :update, {:id => foto.to_param, :foto => valid_attributes}, valid_session + assigns(:foto).should eq(foto) + end + + it "redirects to the foto" do + foto = Foto.create! valid_attributes + put :update, {:id => foto.to_param, :foto => valid_attributes}, valid_session + response.should redirect_to(foto) + end + end + + describe "with invalid params" do + it "assigns the foto as @foto" do + foto = Foto.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Foto.any_instance.stub(:save).and_return(false) + put :update, {:id => foto.to_param, :foto => { "title" => "invalid value" }}, valid_session + assigns(:foto).should eq(foto) + end + + it "re-renders the 'edit' template" do + foto = Foto.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Foto.any_instance.stub(:save).and_return(false) + put :update, {:id => foto.to_param, :foto => { "title" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested foto" do + foto = Foto.create! valid_attributes + expect { + delete :destroy, {:id => foto.to_param}, valid_session + }.to change(Foto, :count).by(-1) + end + + it "redirects to the fotos list" do + foto = Foto.create! valid_attributes + delete :destroy, {:id => foto.to_param}, valid_session + response.should redirect_to(fotos_url) + end + end + +end diff --git a/spec/controllers/galleries_controller_spec.rb b/spec/controllers/galleries_controller_spec.rb new file mode 100644 index 0000000..d8dc260 --- /dev/null +++ b/spec/controllers/galleries_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe GalleriesController do + + # This should return the minimal set of attributes required to create a valid + # Gallery. As you add validations to Gallery, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "name" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # GalleriesController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all galleries as @galleries" do + gallery = Gallery.create! valid_attributes + get :index, {}, valid_session + assigns(:galleries).should eq([gallery]) + end + end + + describe "GET show" do + it "assigns the requested gallery as @gallery" do + gallery = Gallery.create! valid_attributes + get :show, {:id => gallery.to_param}, valid_session + assigns(:gallery).should eq(gallery) + end + end + + describe "GET new" do + it "assigns a new gallery as @gallery" do + get :new, {}, valid_session + assigns(:gallery).should be_a_new(Gallery) + end + end + + describe "GET edit" do + it "assigns the requested gallery as @gallery" do + gallery = Gallery.create! valid_attributes + get :edit, {:id => gallery.to_param}, valid_session + assigns(:gallery).should eq(gallery) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Gallery" do + expect { + post :create, {:gallery => valid_attributes}, valid_session + }.to change(Gallery, :count).by(1) + end + + it "assigns a newly created gallery as @gallery" do + post :create, {:gallery => valid_attributes}, valid_session + assigns(:gallery).should be_a(Gallery) + assigns(:gallery).should be_persisted + end + + it "redirects to the created gallery" do + post :create, {:gallery => valid_attributes}, valid_session + response.should redirect_to(Gallery.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved gallery as @gallery" do + # Trigger the behavior that occurs when invalid params are submitted + Gallery.any_instance.stub(:save).and_return(false) + post :create, {:gallery => { "name" => "invalid value" }}, valid_session + assigns(:gallery).should be_a_new(Gallery) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Gallery.any_instance.stub(:save).and_return(false) + post :create, {:gallery => { "name" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested gallery" do + gallery = Gallery.create! valid_attributes + # Assuming there are no other galleries in the database, this + # specifies that the Gallery created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Gallery.any_instance.should_receive(:update_attributes).with({ "name" => "MyString" }) + put :update, {:id => gallery.to_param, :gallery => { "name" => "MyString" }}, valid_session + end + + it "assigns the requested gallery as @gallery" do + gallery = Gallery.create! valid_attributes + put :update, {:id => gallery.to_param, :gallery => valid_attributes}, valid_session + assigns(:gallery).should eq(gallery) + end + + it "redirects to the gallery" do + gallery = Gallery.create! valid_attributes + put :update, {:id => gallery.to_param, :gallery => valid_attributes}, valid_session + response.should redirect_to(gallery) + end + end + + describe "with invalid params" do + it "assigns the gallery as @gallery" do + gallery = Gallery.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Gallery.any_instance.stub(:save).and_return(false) + put :update, {:id => gallery.to_param, :gallery => { "name" => "invalid value" }}, valid_session + assigns(:gallery).should eq(gallery) + end + + it "re-renders the 'edit' template" do + gallery = Gallery.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Gallery.any_instance.stub(:save).and_return(false) + put :update, {:id => gallery.to_param, :gallery => { "name" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested gallery" do + gallery = Gallery.create! valid_attributes + expect { + delete :destroy, {:id => gallery.to_param}, valid_session + }.to change(Gallery, :count).by(-1) + end + + it "redirects to the galleries list" do + gallery = Gallery.create! valid_attributes + delete :destroy, {:id => gallery.to_param}, valid_session + response.should redirect_to(galleries_url) + end + end + +end diff --git a/spec/controllers/gremien_controller_spec.rb b/spec/controllers/gremien_controller_spec.rb new file mode 100644 index 0000000..6045afe --- /dev/null +++ b/spec/controllers/gremien_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe GremienController do + + # This should return the minimal set of attributes required to create a valid + # Gremium. As you add validations to Gremium, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "name" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # GremienController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all gremien as @gremien" do + gremium = Gremium.create! valid_attributes + get :index, {}, valid_session + assigns(:gremien).should eq([gremium]) + end + end + + describe "GET show" do + it "assigns the requested gremium as @gremium" do + gremium = Gremium.create! valid_attributes + get :show, {:id => gremium.to_param}, valid_session + assigns(:gremium).should eq(gremium) + end + end + + describe "GET new" do + it "assigns a new gremium as @gremium" do + get :new, {}, valid_session + assigns(:gremium).should be_a_new(Gremium) + end + end + + describe "GET edit" do + it "assigns the requested gremium as @gremium" do + gremium = Gremium.create! valid_attributes + get :edit, {:id => gremium.to_param}, valid_session + assigns(:gremium).should eq(gremium) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Gremium" do + expect { + post :create, {:gremium => valid_attributes}, valid_session + }.to change(Gremium, :count).by(1) + end + + it "assigns a newly created gremium as @gremium" do + post :create, {:gremium => valid_attributes}, valid_session + assigns(:gremium).should be_a(Gremium) + assigns(:gremium).should be_persisted + end + + it "redirects to the created gremium" do + post :create, {:gremium => valid_attributes}, valid_session + response.should redirect_to(Gremium.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved gremium as @gremium" do + # Trigger the behavior that occurs when invalid params are submitted + Gremium.any_instance.stub(:save).and_return(false) + post :create, {:gremium => { "name" => "invalid value" }}, valid_session + assigns(:gremium).should be_a_new(Gremium) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Gremium.any_instance.stub(:save).and_return(false) + post :create, {:gremium => { "name" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested gremium" do + gremium = Gremium.create! valid_attributes + # Assuming there are no other gremien in the database, this + # specifies that the Gremium created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Gremium.any_instance.should_receive(:update_attributes).with({ "name" => "MyString" }) + put :update, {:id => gremium.to_param, :gremium => { "name" => "MyString" }}, valid_session + end + + it "assigns the requested gremium as @gremium" do + gremium = Gremium.create! valid_attributes + put :update, {:id => gremium.to_param, :gremium => valid_attributes}, valid_session + assigns(:gremium).should eq(gremium) + end + + it "redirects to the gremium" do + gremium = Gremium.create! valid_attributes + put :update, {:id => gremium.to_param, :gremium => valid_attributes}, valid_session + response.should redirect_to(gremium) + end + end + + describe "with invalid params" do + it "assigns the gremium as @gremium" do + gremium = Gremium.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Gremium.any_instance.stub(:save).and_return(false) + put :update, {:id => gremium.to_param, :gremium => { "name" => "invalid value" }}, valid_session + assigns(:gremium).should eq(gremium) + end + + it "re-renders the 'edit' template" do + gremium = Gremium.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Gremium.any_instance.stub(:save).and_return(false) + put :update, {:id => gremium.to_param, :gremium => { "name" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested gremium" do + gremium = Gremium.create! valid_attributes + expect { + delete :destroy, {:id => gremium.to_param}, valid_session + }.to change(Gremium, :count).by(-1) + end + + it "redirects to the gremien list" do + gremium = Gremium.create! valid_attributes + delete :destroy, {:id => gremium.to_param}, valid_session + response.should redirect_to(gremien_url) + end + end + +end diff --git a/spec/controllers/memberships_controller_spec.rb b/spec/controllers/memberships_controller_spec.rb new file mode 100644 index 0000000..87c3ab3 --- /dev/null +++ b/spec/controllers/memberships_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe MembershipsController do + + # This should return the minimal set of attributes required to create a valid + # Membership. As you add validations to Membership, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "fetprofile_id" => "MyString" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # MembershipsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all memberships as @memberships" do + membership = Membership.create! valid_attributes + get :index, {}, valid_session + assigns(:memberships).should eq([membership]) + end + end + + describe "GET show" do + it "assigns the requested membership as @membership" do + membership = Membership.create! valid_attributes + get :show, {:id => membership.to_param}, valid_session + assigns(:membership).should eq(membership) + end + end + + describe "GET new" do + it "assigns a new membership as @membership" do + get :new, {}, valid_session + assigns(:membership).should be_a_new(Membership) + end + end + + describe "GET edit" do + it "assigns the requested membership as @membership" do + membership = Membership.create! valid_attributes + get :edit, {:id => membership.to_param}, valid_session + assigns(:membership).should eq(membership) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Membership" do + expect { + post :create, {:membership => valid_attributes}, valid_session + }.to change(Membership, :count).by(1) + end + + it "assigns a newly created membership as @membership" do + post :create, {:membership => valid_attributes}, valid_session + assigns(:membership).should be_a(Membership) + assigns(:membership).should be_persisted + end + + it "redirects to the created membership" do + post :create, {:membership => valid_attributes}, valid_session + response.should redirect_to(Membership.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved membership as @membership" do + # Trigger the behavior that occurs when invalid params are submitted + Membership.any_instance.stub(:save).and_return(false) + post :create, {:membership => { "fetprofile_id" => "invalid value" }}, valid_session + assigns(:membership).should be_a_new(Membership) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Membership.any_instance.stub(:save).and_return(false) + post :create, {:membership => { "fetprofile_id" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested membership" do + membership = Membership.create! valid_attributes + # Assuming there are no other memberships in the database, this + # specifies that the Membership created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Membership.any_instance.should_receive(:update_attributes).with({ "fetprofile_id" => "MyString" }) + put :update, {:id => membership.to_param, :membership => { "fetprofile_id" => "MyString" }}, valid_session + end + + it "assigns the requested membership as @membership" do + membership = Membership.create! valid_attributes + put :update, {:id => membership.to_param, :membership => valid_attributes}, valid_session + assigns(:membership).should eq(membership) + end + + it "redirects to the membership" do + membership = Membership.create! valid_attributes + put :update, {:id => membership.to_param, :membership => valid_attributes}, valid_session + response.should redirect_to(membership) + end + end + + describe "with invalid params" do + it "assigns the membership as @membership" do + membership = Membership.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Membership.any_instance.stub(:save).and_return(false) + put :update, {:id => membership.to_param, :membership => { "fetprofile_id" => "invalid value" }}, valid_session + assigns(:membership).should eq(membership) + end + + it "re-renders the 'edit' template" do + membership = Membership.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Membership.any_instance.stub(:save).and_return(false) + put :update, {:id => membership.to_param, :membership => { "fetprofile_id" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested membership" do + membership = Membership.create! valid_attributes + expect { + delete :destroy, {:id => membership.to_param}, valid_session + }.to change(Membership, :count).by(-1) + end + + it "redirects to the memberships list" do + membership = Membership.create! valid_attributes + delete :destroy, {:id => membership.to_param}, valid_session + response.should redirect_to(memberships_url) + end + end + +end diff --git a/spec/factories/fetprofiles.rb b/spec/factories/fetprofiles.rb new file mode 100644 index 0000000..8576a20 --- /dev/null +++ b/spec/factories/fetprofiles.rb @@ -0,0 +1,13 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :fetprofile do + vorname "MyString" + nachname "MyString" + short "MyString" + fetmailalias "MyString" + desc "MyText" + picture "MyString" + active false + end +end diff --git a/spec/factories/fetzneditions.rb b/spec/factories/fetzneditions.rb new file mode 100644 index 0000000..13c3de2 --- /dev/null +++ b/spec/factories/fetzneditions.rb @@ -0,0 +1,10 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :fetznedition do + title "MyString" + desc "MyText" + datum "2013-08-19" + datei "MyString" + end +end diff --git a/spec/factories/fotos.rb b/spec/factories/fotos.rb new file mode 100644 index 0000000..f1c80d9 --- /dev/null +++ b/spec/factories/fotos.rb @@ -0,0 +1,10 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :foto do + title "MyString" + desc "MyText" + gallery_id 1 + datei "MyString" + end +end diff --git a/spec/factories/galleries.rb b/spec/factories/galleries.rb new file mode 100644 index 0000000..48bac09 --- /dev/null +++ b/spec/factories/galleries.rb @@ -0,0 +1,9 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :gallery do + name "MyString" + desc "MyText" + datum "2013-08-19" + end +end diff --git a/spec/factories/gremien.rb b/spec/factories/gremien.rb new file mode 100644 index 0000000..fcce55d --- /dev/null +++ b/spec/factories/gremien.rb @@ -0,0 +1,9 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :gremium do + name "MyString" + desc "MyText" + typ "MyString" + end +end diff --git a/spec/factories/memberships.rb b/spec/factories/memberships.rb new file mode 100644 index 0000000..56a7e0a --- /dev/null +++ b/spec/factories/memberships.rb @@ -0,0 +1,11 @@ +# Read about factories at https://github.com/thoughtbot/factory_girl + +FactoryGirl.define do + factory :membership do + fetprofile_id "MyString" + gremium_id "MyString" + start "2013-08-19" + stop "2013-08-19" + typ "MyString" + end +end diff --git a/spec/helpers/fetprofiles_helper_spec.rb b/spec/helpers/fetprofiles_helper_spec.rb new file mode 100644 index 0000000..89fbda1 --- /dev/null +++ b/spec/helpers/fetprofiles_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the FetprofilesHelper. For example: +# +# describe FetprofilesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe FetprofilesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/fetzneditions_helper_spec.rb b/spec/helpers/fetzneditions_helper_spec.rb new file mode 100644 index 0000000..79232c0 --- /dev/null +++ b/spec/helpers/fetzneditions_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the FetzneditionsHelper. For example: +# +# describe FetzneditionsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe FetzneditionsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/fotos_helper_spec.rb b/spec/helpers/fotos_helper_spec.rb new file mode 100644 index 0000000..0269b9d --- /dev/null +++ b/spec/helpers/fotos_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the FotosHelper. For example: +# +# describe FotosHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe FotosHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/galleries_helper_spec.rb b/spec/helpers/galleries_helper_spec.rb new file mode 100644 index 0000000..81df258 --- /dev/null +++ b/spec/helpers/galleries_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the GalleriesHelper. For example: +# +# describe GalleriesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe GalleriesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/gremien_helper_spec.rb b/spec/helpers/gremien_helper_spec.rb new file mode 100644 index 0000000..14f15e1 --- /dev/null +++ b/spec/helpers/gremien_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the GremienHelper. For example: +# +# describe GremienHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe GremienHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/memberships_helper_spec.rb b/spec/helpers/memberships_helper_spec.rb new file mode 100644 index 0000000..3c64815 --- /dev/null +++ b/spec/helpers/memberships_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the MembershipsHelper. For example: +# +# describe MembershipsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +describe MembershipsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/fetprofile_spec.rb b/spec/models/fetprofile_spec.rb new file mode 100644 index 0000000..5714406 --- /dev/null +++ b/spec/models/fetprofile_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Fetprofile do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/fetznedition_spec.rb b/spec/models/fetznedition_spec.rb new file mode 100644 index 0000000..afee13a --- /dev/null +++ b/spec/models/fetznedition_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Fetznedition do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/foto_spec.rb b/spec/models/foto_spec.rb new file mode 100644 index 0000000..3349aed --- /dev/null +++ b/spec/models/foto_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Foto do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/gallery_spec.rb b/spec/models/gallery_spec.rb new file mode 100644 index 0000000..5dddc63 --- /dev/null +++ b/spec/models/gallery_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Gallery do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/gremium_spec.rb b/spec/models/gremium_spec.rb new file mode 100644 index 0000000..8f34f2a --- /dev/null +++ b/spec/models/gremium_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Gremium do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/membership_spec.rb b/spec/models/membership_spec.rb new file mode 100644 index 0000000..0713bda --- /dev/null +++ b/spec/models/membership_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Membership do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/requests/fetprofiles_spec.rb b/spec/requests/fetprofiles_spec.rb new file mode 100644 index 0000000..fefa133 --- /dev/null +++ b/spec/requests/fetprofiles_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Fetprofiles" do + describe "GET /fetprofiles" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get fetprofiles_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/fetzneditions_spec.rb b/spec/requests/fetzneditions_spec.rb new file mode 100644 index 0000000..572d1ca --- /dev/null +++ b/spec/requests/fetzneditions_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Fetzneditions" do + describe "GET /fetzneditions" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get fetzneditions_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/fotos_spec.rb b/spec/requests/fotos_spec.rb new file mode 100644 index 0000000..4075b2d --- /dev/null +++ b/spec/requests/fotos_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Fotos" do + describe "GET /fotos" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get fotos_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/galleries_spec.rb b/spec/requests/galleries_spec.rb new file mode 100644 index 0000000..b3b56d7 --- /dev/null +++ b/spec/requests/galleries_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Galleries" do + describe "GET /galleries" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get galleries_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/gremien_spec.rb b/spec/requests/gremien_spec.rb new file mode 100644 index 0000000..b3cd5ae --- /dev/null +++ b/spec/requests/gremien_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Gremien" do + describe "GET /gremien" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get gremien_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/memberships_spec.rb b/spec/requests/memberships_spec.rb new file mode 100644 index 0000000..a3a701b --- /dev/null +++ b/spec/requests/memberships_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Memberships" do + describe "GET /memberships" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get memberships_path + response.status.should be(200) + end + end +end diff --git a/spec/routing/fetprofiles_routing_spec.rb b/spec/routing/fetprofiles_routing_spec.rb new file mode 100644 index 0000000..e1851f0 --- /dev/null +++ b/spec/routing/fetprofiles_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe FetprofilesController do + describe "routing" do + + it "routes to #index" do + get("/fetprofiles").should route_to("fetprofiles#index") + end + + it "routes to #new" do + get("/fetprofiles/new").should route_to("fetprofiles#new") + end + + it "routes to #show" do + get("/fetprofiles/1").should route_to("fetprofiles#show", :id => "1") + end + + it "routes to #edit" do + get("/fetprofiles/1/edit").should route_to("fetprofiles#edit", :id => "1") + end + + it "routes to #create" do + post("/fetprofiles").should route_to("fetprofiles#create") + end + + it "routes to #update" do + put("/fetprofiles/1").should route_to("fetprofiles#update", :id => "1") + end + + it "routes to #destroy" do + delete("/fetprofiles/1").should route_to("fetprofiles#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/fetzneditions_routing_spec.rb b/spec/routing/fetzneditions_routing_spec.rb new file mode 100644 index 0000000..bb19f9c --- /dev/null +++ b/spec/routing/fetzneditions_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe FetzneditionsController do + describe "routing" do + + it "routes to #index" do + get("/fetzneditions").should route_to("fetzneditions#index") + end + + it "routes to #new" do + get("/fetzneditions/new").should route_to("fetzneditions#new") + end + + it "routes to #show" do + get("/fetzneditions/1").should route_to("fetzneditions#show", :id => "1") + end + + it "routes to #edit" do + get("/fetzneditions/1/edit").should route_to("fetzneditions#edit", :id => "1") + end + + it "routes to #create" do + post("/fetzneditions").should route_to("fetzneditions#create") + end + + it "routes to #update" do + put("/fetzneditions/1").should route_to("fetzneditions#update", :id => "1") + end + + it "routes to #destroy" do + delete("/fetzneditions/1").should route_to("fetzneditions#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/fotos_routing_spec.rb b/spec/routing/fotos_routing_spec.rb new file mode 100644 index 0000000..728a46c --- /dev/null +++ b/spec/routing/fotos_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe FotosController do + describe "routing" do + + it "routes to #index" do + get("/fotos").should route_to("fotos#index") + end + + it "routes to #new" do + get("/fotos/new").should route_to("fotos#new") + end + + it "routes to #show" do + get("/fotos/1").should route_to("fotos#show", :id => "1") + end + + it "routes to #edit" do + get("/fotos/1/edit").should route_to("fotos#edit", :id => "1") + end + + it "routes to #create" do + post("/fotos").should route_to("fotos#create") + end + + it "routes to #update" do + put("/fotos/1").should route_to("fotos#update", :id => "1") + end + + it "routes to #destroy" do + delete("/fotos/1").should route_to("fotos#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/galleries_routing_spec.rb b/spec/routing/galleries_routing_spec.rb new file mode 100644 index 0000000..92d72dc --- /dev/null +++ b/spec/routing/galleries_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe GalleriesController do + describe "routing" do + + it "routes to #index" do + get("/galleries").should route_to("galleries#index") + end + + it "routes to #new" do + get("/galleries/new").should route_to("galleries#new") + end + + it "routes to #show" do + get("/galleries/1").should route_to("galleries#show", :id => "1") + end + + it "routes to #edit" do + get("/galleries/1/edit").should route_to("galleries#edit", :id => "1") + end + + it "routes to #create" do + post("/galleries").should route_to("galleries#create") + end + + it "routes to #update" do + put("/galleries/1").should route_to("galleries#update", :id => "1") + end + + it "routes to #destroy" do + delete("/galleries/1").should route_to("galleries#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/gremien_routing_spec.rb b/spec/routing/gremien_routing_spec.rb new file mode 100644 index 0000000..840c2c8 --- /dev/null +++ b/spec/routing/gremien_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe GremienController do + describe "routing" do + + it "routes to #index" do + get("/gremien").should route_to("gremien#index") + end + + it "routes to #new" do + get("/gremien/new").should route_to("gremien#new") + end + + it "routes to #show" do + get("/gremien/1").should route_to("gremien#show", :id => "1") + end + + it "routes to #edit" do + get("/gremien/1/edit").should route_to("gremien#edit", :id => "1") + end + + it "routes to #create" do + post("/gremien").should route_to("gremien#create") + end + + it "routes to #update" do + put("/gremien/1").should route_to("gremien#update", :id => "1") + end + + it "routes to #destroy" do + delete("/gremien/1").should route_to("gremien#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/memberships_routing_spec.rb b/spec/routing/memberships_routing_spec.rb new file mode 100644 index 0000000..a3d667c --- /dev/null +++ b/spec/routing/memberships_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe MembershipsController do + describe "routing" do + + it "routes to #index" do + get("/memberships").should route_to("memberships#index") + end + + it "routes to #new" do + get("/memberships/new").should route_to("memberships#new") + end + + it "routes to #show" do + get("/memberships/1").should route_to("memberships#show", :id => "1") + end + + it "routes to #edit" do + get("/memberships/1/edit").should route_to("memberships#edit", :id => "1") + end + + it "routes to #create" do + post("/memberships").should route_to("memberships#create") + end + + it "routes to #update" do + put("/memberships/1").should route_to("memberships#update", :id => "1") + end + + it "routes to #destroy" do + delete("/memberships/1").should route_to("memberships#destroy", :id => "1") + end + + end +end diff --git a/spec/views/fetprofiles/edit.html.erb_spec.rb b/spec/views/fetprofiles/edit.html.erb_spec.rb new file mode 100644 index 0000000..c68d7e3 --- /dev/null +++ b/spec/views/fetprofiles/edit.html.erb_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' + +describe "fetprofiles/edit" do + before(:each) do + @fetprofile = assign(:fetprofile, stub_model(Fetprofile, + :vorname => "MyString", + :nachname => "MyString", + :short => "MyString", + :fetmailalias => "MyString", + :desc => "MyText", + :picture => "MyString", + :active => false + )) + end + + it "renders the edit fetprofile form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", fetprofile_path(@fetprofile), "post" do + assert_select "input#fetprofile_vorname[name=?]", "fetprofile[vorname]" + assert_select "input#fetprofile_nachname[name=?]", "fetprofile[nachname]" + assert_select "input#fetprofile_short[name=?]", "fetprofile[short]" + assert_select "input#fetprofile_fetmailalias[name=?]", "fetprofile[fetmailalias]" + assert_select "textarea#fetprofile_desc[name=?]", "fetprofile[desc]" + assert_select "input#fetprofile_picture[name=?]", "fetprofile[picture]" + assert_select "input#fetprofile_active[name=?]", "fetprofile[active]" + end + end +end diff --git a/spec/views/fetprofiles/index.html.erb_spec.rb b/spec/views/fetprofiles/index.html.erb_spec.rb new file mode 100644 index 0000000..34593da --- /dev/null +++ b/spec/views/fetprofiles/index.html.erb_spec.rb @@ -0,0 +1,38 @@ +require 'spec_helper' + +describe "fetprofiles/index" do + before(:each) do + assign(:fetprofiles, [ + stub_model(Fetprofile, + :vorname => "Vorname", + :nachname => "Nachname", + :short => "Short", + :fetmailalias => "Fetmailalias", + :desc => "MyText", + :picture => "Picture", + :active => false + ), + stub_model(Fetprofile, + :vorname => "Vorname", + :nachname => "Nachname", + :short => "Short", + :fetmailalias => "Fetmailalias", + :desc => "MyText", + :picture => "Picture", + :active => false + ) + ]) + end + + it "renders a list of fetprofiles" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Vorname".to_s, :count => 2 + assert_select "tr>td", :text => "Nachname".to_s, :count => 2 + assert_select "tr>td", :text => "Short".to_s, :count => 2 + assert_select "tr>td", :text => "Fetmailalias".to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + assert_select "tr>td", :text => "Picture".to_s, :count => 2 + assert_select "tr>td", :text => false.to_s, :count => 2 + end +end diff --git a/spec/views/fetprofiles/new.html.erb_spec.rb b/spec/views/fetprofiles/new.html.erb_spec.rb new file mode 100644 index 0000000..8b6ce6c --- /dev/null +++ b/spec/views/fetprofiles/new.html.erb_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' + +describe "fetprofiles/new" do + before(:each) do + assign(:fetprofile, stub_model(Fetprofile, + :vorname => "MyString", + :nachname => "MyString", + :short => "MyString", + :fetmailalias => "MyString", + :desc => "MyText", + :picture => "MyString", + :active => false + ).as_new_record) + end + + it "renders new fetprofile form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", fetprofiles_path, "post" do + assert_select "input#fetprofile_vorname[name=?]", "fetprofile[vorname]" + assert_select "input#fetprofile_nachname[name=?]", "fetprofile[nachname]" + assert_select "input#fetprofile_short[name=?]", "fetprofile[short]" + assert_select "input#fetprofile_fetmailalias[name=?]", "fetprofile[fetmailalias]" + assert_select "textarea#fetprofile_desc[name=?]", "fetprofile[desc]" + assert_select "input#fetprofile_picture[name=?]", "fetprofile[picture]" + assert_select "input#fetprofile_active[name=?]", "fetprofile[active]" + end + end +end diff --git a/spec/views/fetprofiles/show.html.erb_spec.rb b/spec/views/fetprofiles/show.html.erb_spec.rb new file mode 100644 index 0000000..dee3f2d --- /dev/null +++ b/spec/views/fetprofiles/show.html.erb_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +describe "fetprofiles/show" do + before(:each) do + @fetprofile = assign(:fetprofile, stub_model(Fetprofile, + :vorname => "Vorname", + :nachname => "Nachname", + :short => "Short", + :fetmailalias => "Fetmailalias", + :desc => "MyText", + :picture => "Picture", + :active => false + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Vorname/) + rendered.should match(/Nachname/) + rendered.should match(/Short/) + rendered.should match(/Fetmailalias/) + rendered.should match(/MyText/) + rendered.should match(/Picture/) + rendered.should match(/false/) + end +end diff --git a/spec/views/fetzneditions/edit.html.erb_spec.rb b/spec/views/fetzneditions/edit.html.erb_spec.rb new file mode 100644 index 0000000..f27a6c4 --- /dev/null +++ b/spec/views/fetzneditions/edit.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "fetzneditions/edit" do + before(:each) do + @fetznedition = assign(:fetznedition, stub_model(Fetznedition, + :title => "MyString", + :desc => "MyText", + :datei => "MyString" + )) + end + + it "renders the edit fetznedition form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", fetznedition_path(@fetznedition), "post" do + assert_select "input#fetznedition_title[name=?]", "fetznedition[title]" + assert_select "textarea#fetznedition_desc[name=?]", "fetznedition[desc]" + assert_select "input#fetznedition_datei[name=?]", "fetznedition[datei]" + end + end +end diff --git a/spec/views/fetzneditions/index.html.erb_spec.rb b/spec/views/fetzneditions/index.html.erb_spec.rb new file mode 100644 index 0000000..db31c23 --- /dev/null +++ b/spec/views/fetzneditions/index.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "fetzneditions/index" do + before(:each) do + assign(:fetzneditions, [ + stub_model(Fetznedition, + :title => "Title", + :desc => "MyText", + :datei => "Datei" + ), + stub_model(Fetznedition, + :title => "Title", + :desc => "MyText", + :datei => "Datei" + ) + ]) + end + + it "renders a list of fetzneditions" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Title".to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + assert_select "tr>td", :text => "Datei".to_s, :count => 2 + end +end diff --git a/spec/views/fetzneditions/new.html.erb_spec.rb b/spec/views/fetzneditions/new.html.erb_spec.rb new file mode 100644 index 0000000..2be1b98 --- /dev/null +++ b/spec/views/fetzneditions/new.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "fetzneditions/new" do + before(:each) do + assign(:fetznedition, stub_model(Fetznedition, + :title => "MyString", + :desc => "MyText", + :datei => "MyString" + ).as_new_record) + end + + it "renders new fetznedition form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", fetzneditions_path, "post" do + assert_select "input#fetznedition_title[name=?]", "fetznedition[title]" + assert_select "textarea#fetznedition_desc[name=?]", "fetznedition[desc]" + assert_select "input#fetznedition_datei[name=?]", "fetznedition[datei]" + end + end +end diff --git a/spec/views/fetzneditions/show.html.erb_spec.rb b/spec/views/fetzneditions/show.html.erb_spec.rb new file mode 100644 index 0000000..3559505 --- /dev/null +++ b/spec/views/fetzneditions/show.html.erb_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe "fetzneditions/show" do + before(:each) do + @fetznedition = assign(:fetznedition, stub_model(Fetznedition, + :title => "Title", + :desc => "MyText", + :datei => "Datei" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Title/) + rendered.should match(/MyText/) + rendered.should match(/Datei/) + end +end diff --git a/spec/views/fotos/edit.html.erb_spec.rb b/spec/views/fotos/edit.html.erb_spec.rb new file mode 100644 index 0000000..67d2792 --- /dev/null +++ b/spec/views/fotos/edit.html.erb_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe "fotos/edit" do + before(:each) do + @foto = assign(:foto, stub_model(Foto, + :title => "MyString", + :desc => "MyText", + :gallery_id => 1, + :datei => "MyString" + )) + end + + it "renders the edit foto form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", foto_path(@foto), "post" do + assert_select "input#foto_title[name=?]", "foto[title]" + assert_select "textarea#foto_desc[name=?]", "foto[desc]" + assert_select "input#foto_gallery_id[name=?]", "foto[gallery_id]" + assert_select "input#foto_datei[name=?]", "foto[datei]" + end + end +end diff --git a/spec/views/fotos/index.html.erb_spec.rb b/spec/views/fotos/index.html.erb_spec.rb new file mode 100644 index 0000000..4743444 --- /dev/null +++ b/spec/views/fotos/index.html.erb_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe "fotos/index" do + before(:each) do + assign(:fotos, [ + stub_model(Foto, + :title => "Title", + :desc => "MyText", + :gallery_id => 1, + :datei => "Datei" + ), + stub_model(Foto, + :title => "Title", + :desc => "MyText", + :gallery_id => 1, + :datei => "Datei" + ) + ]) + end + + it "renders a list of fotos" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Title".to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + assert_select "tr>td", :text => 1.to_s, :count => 2 + assert_select "tr>td", :text => "Datei".to_s, :count => 2 + end +end diff --git a/spec/views/fotos/new.html.erb_spec.rb b/spec/views/fotos/new.html.erb_spec.rb new file mode 100644 index 0000000..65c7314 --- /dev/null +++ b/spec/views/fotos/new.html.erb_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe "fotos/new" do + before(:each) do + assign(:foto, stub_model(Foto, + :title => "MyString", + :desc => "MyText", + :gallery_id => 1, + :datei => "MyString" + ).as_new_record) + end + + it "renders new foto form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", fotos_path, "post" do + assert_select "input#foto_title[name=?]", "foto[title]" + assert_select "textarea#foto_desc[name=?]", "foto[desc]" + assert_select "input#foto_gallery_id[name=?]", "foto[gallery_id]" + assert_select "input#foto_datei[name=?]", "foto[datei]" + end + end +end diff --git a/spec/views/fotos/show.html.erb_spec.rb b/spec/views/fotos/show.html.erb_spec.rb new file mode 100644 index 0000000..259bdea --- /dev/null +++ b/spec/views/fotos/show.html.erb_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe "fotos/show" do + before(:each) do + @foto = assign(:foto, stub_model(Foto, + :title => "Title", + :desc => "MyText", + :gallery_id => 1, + :datei => "Datei" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Title/) + rendered.should match(/MyText/) + rendered.should match(/1/) + rendered.should match(/Datei/) + end +end diff --git a/spec/views/galleries/edit.html.erb_spec.rb b/spec/views/galleries/edit.html.erb_spec.rb new file mode 100644 index 0000000..988c6e7 --- /dev/null +++ b/spec/views/galleries/edit.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "galleries/edit" do + before(:each) do + @gallery = assign(:gallery, stub_model(Gallery, + :name => "MyString", + :desc => "MyText" + )) + end + + it "renders the edit gallery form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", gallery_path(@gallery), "post" do + assert_select "input#gallery_name[name=?]", "gallery[name]" + assert_select "textarea#gallery_desc[name=?]", "gallery[desc]" + end + end +end diff --git a/spec/views/galleries/index.html.erb_spec.rb b/spec/views/galleries/index.html.erb_spec.rb new file mode 100644 index 0000000..43ea221 --- /dev/null +++ b/spec/views/galleries/index.html.erb_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "galleries/index" do + before(:each) do + assign(:galleries, [ + stub_model(Gallery, + :name => "Name", + :desc => "MyText" + ), + stub_model(Gallery, + :name => "Name", + :desc => "MyText" + ) + ]) + end + + it "renders a list of galleries" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Name".to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + end +end diff --git a/spec/views/galleries/new.html.erb_spec.rb b/spec/views/galleries/new.html.erb_spec.rb new file mode 100644 index 0000000..843e76d --- /dev/null +++ b/spec/views/galleries/new.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "galleries/new" do + before(:each) do + assign(:gallery, stub_model(Gallery, + :name => "MyString", + :desc => "MyText" + ).as_new_record) + end + + it "renders new gallery form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", galleries_path, "post" do + assert_select "input#gallery_name[name=?]", "gallery[name]" + assert_select "textarea#gallery_desc[name=?]", "gallery[desc]" + end + end +end diff --git a/spec/views/galleries/show.html.erb_spec.rb b/spec/views/galleries/show.html.erb_spec.rb new file mode 100644 index 0000000..55cf54d --- /dev/null +++ b/spec/views/galleries/show.html.erb_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "galleries/show" do + before(:each) do + @gallery = assign(:gallery, stub_model(Gallery, + :name => "Name", + :desc => "MyText" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Name/) + rendered.should match(/MyText/) + end +end diff --git a/spec/views/gremien/edit.html.erb_spec.rb b/spec/views/gremien/edit.html.erb_spec.rb new file mode 100644 index 0000000..51a10a3 --- /dev/null +++ b/spec/views/gremien/edit.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "gremien/edit" do + before(:each) do + @gremium = assign(:gremium, stub_model(Gremium, + :name => "MyString", + :desc => "MyText", + :typ => "MyString" + )) + end + + it "renders the edit gremium form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", gremium_path(@gremium), "post" do + assert_select "input#gremium_name[name=?]", "gremium[name]" + assert_select "textarea#gremium_desc[name=?]", "gremium[desc]" + assert_select "input#gremium_typ[name=?]", "gremium[typ]" + end + end +end diff --git a/spec/views/gremien/index.html.erb_spec.rb b/spec/views/gremien/index.html.erb_spec.rb new file mode 100644 index 0000000..01a8e93 --- /dev/null +++ b/spec/views/gremien/index.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "gremien/index" do + before(:each) do + assign(:gremien, [ + stub_model(Gremium, + :name => "Name", + :desc => "MyText", + :typ => "Typ" + ), + stub_model(Gremium, + :name => "Name", + :desc => "MyText", + :typ => "Typ" + ) + ]) + end + + it "renders a list of gremien" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Name".to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + assert_select "tr>td", :text => "Typ".to_s, :count => 2 + end +end diff --git a/spec/views/gremien/new.html.erb_spec.rb b/spec/views/gremien/new.html.erb_spec.rb new file mode 100644 index 0000000..ae7ee50 --- /dev/null +++ b/spec/views/gremien/new.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "gremien/new" do + before(:each) do + assign(:gremium, stub_model(Gremium, + :name => "MyString", + :desc => "MyText", + :typ => "MyString" + ).as_new_record) + end + + it "renders new gremium form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", gremien_path, "post" do + assert_select "input#gremium_name[name=?]", "gremium[name]" + assert_select "textarea#gremium_desc[name=?]", "gremium[desc]" + assert_select "input#gremium_typ[name=?]", "gremium[typ]" + end + end +end diff --git a/spec/views/gremien/show.html.erb_spec.rb b/spec/views/gremien/show.html.erb_spec.rb new file mode 100644 index 0000000..6c41450 --- /dev/null +++ b/spec/views/gremien/show.html.erb_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe "gremien/show" do + before(:each) do + @gremium = assign(:gremium, stub_model(Gremium, + :name => "Name", + :desc => "MyText", + :typ => "Typ" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Name/) + rendered.should match(/MyText/) + rendered.should match(/Typ/) + end +end diff --git a/spec/views/memberships/edit.html.erb_spec.rb b/spec/views/memberships/edit.html.erb_spec.rb new file mode 100644 index 0000000..f25891e --- /dev/null +++ b/spec/views/memberships/edit.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "memberships/edit" do + before(:each) do + @membership = assign(:membership, stub_model(Membership, + :fetprofile_id => "MyString", + :gremium_id => "MyString", + :typ => "MyString" + )) + end + + it "renders the edit membership form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", membership_path(@membership), "post" do + assert_select "input#membership_fetprofile_id[name=?]", "membership[fetprofile_id]" + assert_select "input#membership_gremium_id[name=?]", "membership[gremium_id]" + assert_select "input#membership_typ[name=?]", "membership[typ]" + end + end +end diff --git a/spec/views/memberships/index.html.erb_spec.rb b/spec/views/memberships/index.html.erb_spec.rb new file mode 100644 index 0000000..a5c2587 --- /dev/null +++ b/spec/views/memberships/index.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "memberships/index" do + before(:each) do + assign(:memberships, [ + stub_model(Membership, + :fetprofile_id => "Fetprofile", + :gremium_id => "Gremium", + :typ => "Typ" + ), + stub_model(Membership, + :fetprofile_id => "Fetprofile", + :gremium_id => "Gremium", + :typ => "Typ" + ) + ]) + end + + it "renders a list of memberships" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Fetprofile".to_s, :count => 2 + assert_select "tr>td", :text => "Gremium".to_s, :count => 2 + assert_select "tr>td", :text => "Typ".to_s, :count => 2 + end +end diff --git a/spec/views/memberships/new.html.erb_spec.rb b/spec/views/memberships/new.html.erb_spec.rb new file mode 100644 index 0000000..76dc0d2 --- /dev/null +++ b/spec/views/memberships/new.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "memberships/new" do + before(:each) do + assign(:membership, stub_model(Membership, + :fetprofile_id => "MyString", + :gremium_id => "MyString", + :typ => "MyString" + ).as_new_record) + end + + it "renders new membership form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", memberships_path, "post" do + assert_select "input#membership_fetprofile_id[name=?]", "membership[fetprofile_id]" + assert_select "input#membership_gremium_id[name=?]", "membership[gremium_id]" + assert_select "input#membership_typ[name=?]", "membership[typ]" + end + end +end diff --git a/spec/views/memberships/show.html.erb_spec.rb b/spec/views/memberships/show.html.erb_spec.rb new file mode 100644 index 0000000..29b9200 --- /dev/null +++ b/spec/views/memberships/show.html.erb_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe "memberships/show" do + before(:each) do + @membership = assign(:membership, stub_model(Membership, + :fetprofile_id => "Fetprofile", + :gremium_id => "Gremium", + :typ => "Typ" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Fetprofile/) + rendered.should match(/Gremium/) + rendered.should match(/Typ/) + end +end