Godwin
11 years ago
62 changed files with 933 additions and 1 deletions
@ -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://coffeescript.org/ |
@ -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://coffeescript.org/ |
@ -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://coffeescript.org/ |
@ -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://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the event_types controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the events controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the workshop_facilitators controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the workshop_requested_resources controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,58 @@ |
|||
class EventTypesController < ApplicationController |
|||
before_action :set_event_type, only: [:show, :edit, :update, :destroy] |
|||
|
|||
# GET /event_types |
|||
def index |
|||
@event_types = EventType.all |
|||
end |
|||
|
|||
# GET /event_types/1 |
|||
def show |
|||
end |
|||
|
|||
# GET /event_types/new |
|||
def new |
|||
@event_type = EventType.new |
|||
end |
|||
|
|||
# GET /event_types/1/edit |
|||
def edit |
|||
end |
|||
|
|||
# POST /event_types |
|||
def create |
|||
@event_type = EventType.new(event_type_params) |
|||
|
|||
if @event_type.save |
|||
redirect_to @event_type, notice: 'Event type was successfully created.' |
|||
else |
|||
render action: 'new' |
|||
end |
|||
end |
|||
|
|||
# PATCH/PUT /event_types/1 |
|||
def update |
|||
if @event_type.update(event_type_params) |
|||
redirect_to @event_type, notice: 'Event type was successfully updated.' |
|||
else |
|||
render action: 'edit' |
|||
end |
|||
end |
|||
|
|||
# DELETE /event_types/1 |
|||
def destroy |
|||
@event_type.destroy |
|||
redirect_to event_types_url, notice: 'Event type was successfully destroyed.' |
|||
end |
|||
|
|||
private |
|||
# Use callbacks to share common setup or constraints between actions. |
|||
def set_event_type |
|||
@event_type = EventType.find(params[:id]) |
|||
end |
|||
|
|||
# Only allow a trusted parameter "white list" through. |
|||
def event_type_params |
|||
params.require(:event_type).permit(:slug, :info) |
|||
end |
|||
end |
@ -0,0 +1,58 @@ |
|||
class EventsController < ApplicationController |
|||
before_action :set_event, only: [:show, :edit, :update, :destroy] |
|||
|
|||
# GET /events |
|||
def index |
|||
@events = Event.all |
|||
end |
|||
|
|||
# GET /events/1 |
|||
def show |
|||
end |
|||
|
|||
# GET /events/new |
|||
def new |
|||
@event = Event.new |
|||
end |
|||
|
|||
# GET /events/1/edit |
|||
def edit |
|||
end |
|||
|
|||
# POST /events |
|||
def create |
|||
@event = Event.new(event_params) |
|||
|
|||
if @event.save |
|||
redirect_to @event, notice: 'Event was successfully created.' |
|||
else |
|||
render action: 'new' |
|||
end |
|||
end |
|||
|
|||
# PATCH/PUT /events/1 |
|||
def update |
|||
if @event.update(event_params) |
|||
redirect_to @event, notice: 'Event was successfully updated.' |
|||
else |
|||
render action: 'edit' |
|||
end |
|||
end |
|||
|
|||
# DELETE /events/1 |
|||
def destroy |
|||
@event.destroy |
|||
redirect_to events_url, notice: 'Event was successfully destroyed.' |
|||
end |
|||
|
|||
private |
|||
# Use callbacks to share common setup or constraints between actions. |
|||
def set_event |
|||
@event = Event.find(params[:id]) |
|||
end |
|||
|
|||
# Only allow a trusted parameter "white list" through. |
|||
def event_params |
|||
params.require(:event).permit(:title, :slug, :event_type_id, :conference, :info, :location, :start_time, :end_time) |
|||
end |
|||
end |
@ -0,0 +1,58 @@ |
|||
class WorkshopFacilitatorsController < ApplicationController |
|||
before_action :set_workshop_facilitator, only: [:show, :edit, :update, :destroy] |
|||
|
|||
# GET /workshop_facilitators |
|||
def index |
|||
@workshop_facilitators = WorkshopFacilitator.all |
|||
end |
|||
|
|||
# GET /workshop_facilitators/1 |
|||
def show |
|||
end |
|||
|
|||
# GET /workshop_facilitators/new |
|||
def new |
|||
@workshop_facilitator = WorkshopFacilitator.new |
|||
end |
|||
|
|||
# GET /workshop_facilitators/1/edit |
|||
def edit |
|||
end |
|||
|
|||
# POST /workshop_facilitators |
|||
def create |
|||
@workshop_facilitator = WorkshopFacilitator.new(workshop_facilitator_params) |
|||
|
|||
if @workshop_facilitator.save |
|||
redirect_to @workshop_facilitator, notice: 'Workshop facilitator was successfully created.' |
|||
else |
|||
render action: 'new' |
|||
end |
|||
end |
|||
|
|||
# PATCH/PUT /workshop_facilitators/1 |
|||
def update |
|||
if @workshop_facilitator.update(workshop_facilitator_params) |
|||
redirect_to @workshop_facilitator, notice: 'Workshop facilitator was successfully updated.' |
|||
else |
|||
render action: 'edit' |
|||
end |
|||
end |
|||
|
|||
# DELETE /workshop_facilitators/1 |
|||
def destroy |
|||
@workshop_facilitator.destroy |
|||
redirect_to workshop_facilitators_url, notice: 'Workshop facilitator was successfully destroyed.' |
|||
end |
|||
|
|||
private |
|||
# Use callbacks to share common setup or constraints between actions. |
|||
def set_workshop_facilitator |
|||
@workshop_facilitator = WorkshopFacilitator.find(params[:id]) |
|||
end |
|||
|
|||
# Only allow a trusted parameter "white list" through. |
|||
def workshop_facilitator_params |
|||
params.require(:workshop_facilitator).permit(:user_id, :workshop_id, :role) |
|||
end |
|||
end |
@ -0,0 +1,58 @@ |
|||
class WorkshopRequestedResourcesController < ApplicationController |
|||
before_action :set_workshop_requested_resource, only: [:show, :edit, :update, :destroy] |
|||
|
|||
# GET /workshop_requested_resources |
|||
def index |
|||
@workshop_requested_resources = WorkshopRequestedResource.all |
|||
end |
|||
|
|||
# GET /workshop_requested_resources/1 |
|||
def show |
|||
end |
|||
|
|||
# GET /workshop_requested_resources/new |
|||
def new |
|||
@workshop_requested_resource = WorkshopRequestedResource.new |
|||
end |
|||
|
|||
# GET /workshop_requested_resources/1/edit |
|||
def edit |
|||
end |
|||
|
|||
# POST /workshop_requested_resources |
|||
def create |
|||
@workshop_requested_resource = WorkshopRequestedResource.new(workshop_requested_resource_params) |
|||
|
|||
if @workshop_requested_resource.save |
|||
redirect_to @workshop_requested_resource, notice: 'Workshop requested resource was successfully created.' |
|||
else |
|||
render action: 'new' |
|||
end |
|||
end |
|||
|
|||
# PATCH/PUT /workshop_requested_resources/1 |
|||
def update |
|||
if @workshop_requested_resource.update(workshop_requested_resource_params) |
|||
redirect_to @workshop_requested_resource, notice: 'Workshop requested resource was successfully updated.' |
|||
else |
|||
render action: 'edit' |
|||
end |
|||
end |
|||
|
|||
# DELETE /workshop_requested_resources/1 |
|||
def destroy |
|||
@workshop_requested_resource.destroy |
|||
redirect_to workshop_requested_resources_url, notice: 'Workshop requested resource was successfully destroyed.' |
|||
end |
|||
|
|||
private |
|||
# Use callbacks to share common setup or constraints between actions. |
|||
def set_workshop_requested_resource |
|||
@workshop_requested_resource = WorkshopRequestedResource.find(params[:id]) |
|||
end |
|||
|
|||
# Only allow a trusted parameter "white list" through. |
|||
def workshop_requested_resource_params |
|||
params.require(:workshop_requested_resource).permit(:workshop_id, :workshop_resource_id, :status) |
|||
end |
|||
end |
@ -0,0 +1,2 @@ |
|||
module EventTypesHelper |
|||
end |
@ -0,0 +1,2 @@ |
|||
module EventsHelper |
|||
end |
@ -0,0 +1,2 @@ |
|||
module WorkshopFacilitatorsHelper |
|||
end |
@ -0,0 +1,2 @@ |
|||
module WorkshopRequestedResourcesHelper |
|||
end |
@ -0,0 +1,2 @@ |
|||
class Event < ActiveRecord::Base |
|||
end |
@ -0,0 +1,2 @@ |
|||
class EventType < ActiveRecord::Base |
|||
end |
@ -0,0 +1,2 @@ |
|||
class WorkshopFacilitator < ActiveRecord::Base |
|||
end |
@ -0,0 +1,2 @@ |
|||
class WorkshopRequestedResource < ActiveRecord::Base |
|||
end |
@ -0,0 +1,16 @@ |
|||
= form_for @event_type do |f| |
|||
- if @event_type.errors.any? |
|||
#error_explanation |
|||
%h2= "#{pluralize(@event_type.errors.count, "error")} prohibited this event_type from being saved:" |
|||
%ul |
|||
- @event_type.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
|
|||
.field |
|||
= f.label :slug |
|||
= f.text_field :slug |
|||
.field |
|||
= f.label :info |
|||
= f.text_area :info |
|||
.actions |
|||
= f.submit 'Save' |
@ -0,0 +1,7 @@ |
|||
%h1 Editing event_type |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Show', @event_type |
|||
\| |
|||
= link_to 'Back', event_types_path |
@ -0,0 +1,21 @@ |
|||
%h1 Listing event_types |
|||
|
|||
%table |
|||
%tr |
|||
%th Slug |
|||
%th Info |
|||
%th |
|||
%th |
|||
%th |
|||
|
|||
- @event_types.each do |event_type| |
|||
%tr |
|||
%td= event_type.slug |
|||
%td= event_type.info |
|||
%td= link_to 'Show', event_type |
|||
%td= link_to 'Edit', edit_event_type_path(event_type) |
|||
%td= link_to 'Destroy', event_type, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|||
|
|||
%br |
|||
|
|||
= link_to 'New Event type', new_event_type_path |
@ -0,0 +1,5 @@ |
|||
%h1 New event_type |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Back', event_types_path |
@ -0,0 +1,12 @@ |
|||
%p#notice= notice |
|||
|
|||
%p |
|||
%b Slug: |
|||
= @event_type.slug |
|||
%p |
|||
%b Info: |
|||
= @event_type.info |
|||
|
|||
= link_to 'Edit', edit_event_type_path(@event_type) |
|||
\| |
|||
= link_to 'Back', event_types_path |
@ -0,0 +1,34 @@ |
|||
= form_for @event do |f| |
|||
- if @event.errors.any? |
|||
#error_explanation |
|||
%h2= "#{pluralize(@event.errors.count, "error")} prohibited this event from being saved:" |
|||
%ul |
|||
- @event.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
|
|||
.field |
|||
= f.label :title |
|||
= f.text_field :title |
|||
.field |
|||
= f.label :slug |
|||
= f.text_field :slug |
|||
.field |
|||
= f.label :event_type_id |
|||
= f.number_field :event_type_id |
|||
.field |
|||
= f.label :conference |
|||
= f.text_field :conference |
|||
.field |
|||
= f.label :info |
|||
= f.text_area :info |
|||
.field |
|||
= f.label :location |
|||
= f.text_field :location |
|||
.field |
|||
= f.label :start_time |
|||
= f.datetime_select :start_time |
|||
.field |
|||
= f.label :end_time |
|||
= f.datetime_select :end_time |
|||
.actions |
|||
= f.submit 'Save' |
@ -0,0 +1,7 @@ |
|||
%h1 Editing event |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Show', @event |
|||
\| |
|||
= link_to 'Back', events_path |
@ -0,0 +1,33 @@ |
|||
%h1 Listing events |
|||
|
|||
%table |
|||
%tr |
|||
%th Title |
|||
%th Slug |
|||
%th Event type |
|||
%th Conference |
|||
%th Info |
|||
%th Location |
|||
%th Start time |
|||
%th End time |
|||
%th |
|||
%th |
|||
%th |
|||
|
|||
- @events.each do |event| |
|||
%tr |
|||
%td= event.title |
|||
%td= event.slug |
|||
%td= event.event_type_id |
|||
%td= event.conference |
|||
%td= event.info |
|||
%td= event.location |
|||
%td= event.start_time |
|||
%td= event.end_time |
|||
%td= link_to 'Show', event |
|||
%td= link_to 'Edit', edit_event_path(event) |
|||
%td= link_to 'Destroy', event, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|||
|
|||
%br |
|||
|
|||
= link_to 'New Event', new_event_path |
@ -0,0 +1,5 @@ |
|||
%h1 New event |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Back', events_path |
@ -0,0 +1,30 @@ |
|||
%p#notice= notice |
|||
|
|||
%p |
|||
%b Title: |
|||
= @event.title |
|||
%p |
|||
%b Slug: |
|||
= @event.slug |
|||
%p |
|||
%b Event type: |
|||
= @event.event_type_id |
|||
%p |
|||
%b Conference: |
|||
= @event.conference |
|||
%p |
|||
%b Info: |
|||
= @event.info |
|||
%p |
|||
%b Location: |
|||
= @event.location |
|||
%p |
|||
%b Start time: |
|||
= @event.start_time |
|||
%p |
|||
%b End time: |
|||
= @event.end_time |
|||
|
|||
= link_to 'Edit', edit_event_path(@event) |
|||
\| |
|||
= link_to 'Back', events_path |
@ -0,0 +1,19 @@ |
|||
= form_for @workshop_facilitator do |f| |
|||
- if @workshop_facilitator.errors.any? |
|||
#error_explanation |
|||
%h2= "#{pluralize(@workshop_facilitator.errors.count, "error")} prohibited this workshop_facilitator from being saved:" |
|||
%ul |
|||
- @workshop_facilitator.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
|
|||
.field |
|||
= f.label :user_id |
|||
= f.number_field :user_id |
|||
.field |
|||
= f.label :workshop_id |
|||
= f.number_field :workshop_id |
|||
.field |
|||
= f.label :role |
|||
= f.text_field :role |
|||
.actions |
|||
= f.submit 'Save' |
@ -0,0 +1,7 @@ |
|||
%h1 Editing workshop_facilitator |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Show', @workshop_facilitator |
|||
\| |
|||
= link_to 'Back', workshop_facilitators_path |
@ -0,0 +1,23 @@ |
|||
%h1 Listing workshop_facilitators |
|||
|
|||
%table |
|||
%tr |
|||
%th User |
|||
%th Workshop |
|||
%th Role |
|||
%th |
|||
%th |
|||
%th |
|||
|
|||
- @workshop_facilitators.each do |workshop_facilitator| |
|||
%tr |
|||
%td= workshop_facilitator.user_id |
|||
%td= workshop_facilitator.workshop_id |
|||
%td= workshop_facilitator.role |
|||
%td= link_to 'Show', workshop_facilitator |
|||
%td= link_to 'Edit', edit_workshop_facilitator_path(workshop_facilitator) |
|||
%td= link_to 'Destroy', workshop_facilitator, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|||
|
|||
%br |
|||
|
|||
= link_to 'New Workshop facilitator', new_workshop_facilitator_path |
@ -0,0 +1,5 @@ |
|||
%h1 New workshop_facilitator |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Back', workshop_facilitators_path |
@ -0,0 +1,15 @@ |
|||
%p#notice= notice |
|||
|
|||
%p |
|||
%b User: |
|||
= @workshop_facilitator.user_id |
|||
%p |
|||
%b Workshop: |
|||
= @workshop_facilitator.workshop_id |
|||
%p |
|||
%b Role: |
|||
= @workshop_facilitator.role |
|||
|
|||
= link_to 'Edit', edit_workshop_facilitator_path(@workshop_facilitator) |
|||
\| |
|||
= link_to 'Back', workshop_facilitators_path |
@ -0,0 +1,19 @@ |
|||
= form_for @workshop_requested_resource do |f| |
|||
- if @workshop_requested_resource.errors.any? |
|||
#error_explanation |
|||
%h2= "#{pluralize(@workshop_requested_resource.errors.count, "error")} prohibited this workshop_requested_resource from being saved:" |
|||
%ul |
|||
- @workshop_requested_resource.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
|
|||
.field |
|||
= f.label :workshop_id |
|||
= f.number_field :workshop_id |
|||
.field |
|||
= f.label :workshop_resource_id |
|||
= f.number_field :workshop_resource_id |
|||
.field |
|||
= f.label :status |
|||
= f.text_field :status |
|||
.actions |
|||
= f.submit 'Save' |
@ -0,0 +1,7 @@ |
|||
%h1 Editing workshop_requested_resource |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Show', @workshop_requested_resource |
|||
\| |
|||
= link_to 'Back', workshop_requested_resources_path |
@ -0,0 +1,23 @@ |
|||
%h1 Listing workshop_requested_resources |
|||
|
|||
%table |
|||
%tr |
|||
%th Workshop |
|||
%th Workshop resource |
|||
%th Status |
|||
%th |
|||
%th |
|||
%th |
|||
|
|||
- @workshop_requested_resources.each do |workshop_requested_resource| |
|||
%tr |
|||
%td= workshop_requested_resource.workshop_id |
|||
%td= workshop_requested_resource.workshop_resource_id |
|||
%td= workshop_requested_resource.status |
|||
%td= link_to 'Show', workshop_requested_resource |
|||
%td= link_to 'Edit', edit_workshop_requested_resource_path(workshop_requested_resource) |
|||
%td= link_to 'Destroy', workshop_requested_resource, :method => :delete, :data => { :confirm => 'Are you sure?' } |
|||
|
|||
%br |
|||
|
|||
= link_to 'New Workshop requested resource', new_workshop_requested_resource_path |
@ -0,0 +1,5 @@ |
|||
%h1 New workshop_requested_resource |
|||
|
|||
= render 'form' |
|||
|
|||
= link_to 'Back', workshop_requested_resources_path |
@ -0,0 +1,15 @@ |
|||
%p#notice= notice |
|||
|
|||
%p |
|||
%b Workshop: |
|||
= @workshop_requested_resource.workshop_id |
|||
%p |
|||
%b Workshop resource: |
|||
= @workshop_requested_resource.workshop_resource_id |
|||
%p |
|||
%b Status: |
|||
= @workshop_requested_resource.status |
|||
|
|||
= link_to 'Edit', edit_workshop_requested_resource_path(@workshop_requested_resource) |
|||
\| |
|||
= link_to 'Back', workshop_requested_resources_path |
@ -0,0 +1,11 @@ |
|||
class CreateWorkshopFacilitators < ActiveRecord::Migration |
|||
def change |
|||
create_table :workshop_facilitators do |t| |
|||
t.integer :user_id |
|||
t.integer :workshop_id |
|||
t.string :role |
|||
|
|||
t.timestamps |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,11 @@ |
|||
class CreateWorkshopRequestedResources < ActiveRecord::Migration |
|||
def change |
|||
create_table :workshop_requested_resources do |t| |
|||
t.integer :workshop_id |
|||
t.integer :workshop_resource_id |
|||
t.string :status |
|||
|
|||
t.timestamps |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,10 @@ |
|||
class CreateEventTypes < ActiveRecord::Migration |
|||
def change |
|||
create_table :event_types do |t| |
|||
t.string :slug |
|||
t.text :info |
|||
|
|||
t.timestamps |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,16 @@ |
|||
class CreateEvents < ActiveRecord::Migration |
|||
def change |
|||
create_table :events do |t| |
|||
t.string :title |
|||
t.string :slug |
|||
t.integer :event_type_id |
|||
t.conference_id :conference |
|||
t.text :info |
|||
t.location_id :location |
|||
t.datetime :start_time |
|||
t.datetime :end_time |
|||
|
|||
t.timestamps |
|||
end |
|||
end |
|||
end |
@ -0,0 +1,49 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventTypesControllerTest < ActionController::TestCase |
|||
setup do |
|||
@event_type = event_types(:one) |
|||
end |
|||
|
|||
test "should get index" do |
|||
get :index |
|||
assert_response :success |
|||
assert_not_nil assigns(:event_types) |
|||
end |
|||
|
|||
test "should get new" do |
|||
get :new |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should create event_type" do |
|||
assert_difference('EventType.count') do |
|||
post :create, event_type: { info: @event_type.info, slug: @event_type.slug } |
|||
end |
|||
|
|||
assert_redirected_to event_type_path(assigns(:event_type)) |
|||
end |
|||
|
|||
test "should show event_type" do |
|||
get :show, id: @event_type |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should get edit" do |
|||
get :edit, id: @event_type |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should update event_type" do |
|||
patch :update, id: @event_type, event_type: { info: @event_type.info, slug: @event_type.slug } |
|||
assert_redirected_to event_type_path(assigns(:event_type)) |
|||
end |
|||
|
|||
test "should destroy event_type" do |
|||
assert_difference('EventType.count', -1) do |
|||
delete :destroy, id: @event_type |
|||
end |
|||
|
|||
assert_redirected_to event_types_path |
|||
end |
|||
end |
@ -0,0 +1,49 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventsControllerTest < ActionController::TestCase |
|||
setup do |
|||
@event = events(:one) |
|||
end |
|||
|
|||
test "should get index" do |
|||
get :index |
|||
assert_response :success |
|||
assert_not_nil assigns(:events) |
|||
end |
|||
|
|||
test "should get new" do |
|||
get :new |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should create event" do |
|||
assert_difference('Event.count') do |
|||
post :create, event: { conference: @event.conference, end_time: @event.end_time, event_type_id: @event.event_type_id, info: @event.info, location: @event.location, slug: @event.slug, start_time: @event.start_time, title: @event.title } |
|||
end |
|||
|
|||
assert_redirected_to event_path(assigns(:event)) |
|||
end |
|||
|
|||
test "should show event" do |
|||
get :show, id: @event |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should get edit" do |
|||
get :edit, id: @event |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should update event" do |
|||
patch :update, id: @event, event: { conference: @event.conference, end_time: @event.end_time, event_type_id: @event.event_type_id, info: @event.info, location: @event.location, slug: @event.slug, start_time: @event.start_time, title: @event.title } |
|||
assert_redirected_to event_path(assigns(:event)) |
|||
end |
|||
|
|||
test "should destroy event" do |
|||
assert_difference('Event.count', -1) do |
|||
delete :destroy, id: @event |
|||
end |
|||
|
|||
assert_redirected_to events_path |
|||
end |
|||
end |
@ -0,0 +1,49 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopFacilitatorsControllerTest < ActionController::TestCase |
|||
setup do |
|||
@workshop_facilitator = workshop_facilitators(:one) |
|||
end |
|||
|
|||
test "should get index" do |
|||
get :index |
|||
assert_response :success |
|||
assert_not_nil assigns(:workshop_facilitators) |
|||
end |
|||
|
|||
test "should get new" do |
|||
get :new |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should create workshop_facilitator" do |
|||
assert_difference('WorkshopFacilitator.count') do |
|||
post :create, workshop_facilitator: { role: @workshop_facilitator.role, user_id: @workshop_facilitator.user_id, workshop_id: @workshop_facilitator.workshop_id } |
|||
end |
|||
|
|||
assert_redirected_to workshop_facilitator_path(assigns(:workshop_facilitator)) |
|||
end |
|||
|
|||
test "should show workshop_facilitator" do |
|||
get :show, id: @workshop_facilitator |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should get edit" do |
|||
get :edit, id: @workshop_facilitator |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should update workshop_facilitator" do |
|||
patch :update, id: @workshop_facilitator, workshop_facilitator: { role: @workshop_facilitator.role, user_id: @workshop_facilitator.user_id, workshop_id: @workshop_facilitator.workshop_id } |
|||
assert_redirected_to workshop_facilitator_path(assigns(:workshop_facilitator)) |
|||
end |
|||
|
|||
test "should destroy workshop_facilitator" do |
|||
assert_difference('WorkshopFacilitator.count', -1) do |
|||
delete :destroy, id: @workshop_facilitator |
|||
end |
|||
|
|||
assert_redirected_to workshop_facilitators_path |
|||
end |
|||
end |
@ -0,0 +1,49 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopRequestedResourcesControllerTest < ActionController::TestCase |
|||
setup do |
|||
@workshop_requested_resource = workshop_requested_resources(:one) |
|||
end |
|||
|
|||
test "should get index" do |
|||
get :index |
|||
assert_response :success |
|||
assert_not_nil assigns(:workshop_requested_resources) |
|||
end |
|||
|
|||
test "should get new" do |
|||
get :new |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should create workshop_requested_resource" do |
|||
assert_difference('WorkshopRequestedResource.count') do |
|||
post :create, workshop_requested_resource: { status: @workshop_requested_resource.status, workshop_id: @workshop_requested_resource.workshop_id, workshop_resource_id: @workshop_requested_resource.workshop_resource_id } |
|||
end |
|||
|
|||
assert_redirected_to workshop_requested_resource_path(assigns(:workshop_requested_resource)) |
|||
end |
|||
|
|||
test "should show workshop_requested_resource" do |
|||
get :show, id: @workshop_requested_resource |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should get edit" do |
|||
get :edit, id: @workshop_requested_resource |
|||
assert_response :success |
|||
end |
|||
|
|||
test "should update workshop_requested_resource" do |
|||
patch :update, id: @workshop_requested_resource, workshop_requested_resource: { status: @workshop_requested_resource.status, workshop_id: @workshop_requested_resource.workshop_id, workshop_resource_id: @workshop_requested_resource.workshop_resource_id } |
|||
assert_redirected_to workshop_requested_resource_path(assigns(:workshop_requested_resource)) |
|||
end |
|||
|
|||
test "should destroy workshop_requested_resource" do |
|||
assert_difference('WorkshopRequestedResource.count', -1) do |
|||
delete :destroy, id: @workshop_requested_resource |
|||
end |
|||
|
|||
assert_redirected_to workshop_requested_resources_path |
|||
end |
|||
end |
@ -0,0 +1,8 @@ |
|||
# Read about factories at https://github.com/thoughtbot/factory_girl |
|||
|
|||
FactoryGirl.define do |
|||
factory :event_type do |
|||
slug "MyString" |
|||
info "MyText" |
|||
end |
|||
end |
@ -0,0 +1,14 @@ |
|||
# Read about factories at https://github.com/thoughtbot/factory_girl |
|||
|
|||
FactoryGirl.define do |
|||
factory :event do |
|||
title "MyString" |
|||
slug "MyString" |
|||
event_type_id 1 |
|||
conference "" |
|||
info "MyText" |
|||
location "" |
|||
start_time "2014-03-15 12:32:41" |
|||
end_time "2014-03-15 12:32:41" |
|||
end |
|||
end |
@ -0,0 +1,9 @@ |
|||
# Read about factories at https://github.com/thoughtbot/factory_girl |
|||
|
|||
FactoryGirl.define do |
|||
factory :workshop_facilitator do |
|||
user_id 1 |
|||
workshop_id 1 |
|||
role "MyString" |
|||
end |
|||
end |
@ -0,0 +1,9 @@ |
|||
# Read about factories at https://github.com/thoughtbot/factory_girl |
|||
|
|||
FactoryGirl.define do |
|||
factory :workshop_requested_resource do |
|||
workshop_id 1 |
|||
workshop_resource_id 1 |
|||
status "MyString" |
|||
end |
|||
end |
@ -0,0 +1,4 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventTypesHelperTest < ActionView::TestCase |
|||
end |
@ -0,0 +1,4 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventsHelperTest < ActionView::TestCase |
|||
end |
@ -0,0 +1,4 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopFacilitatorsHelperTest < ActionView::TestCase |
|||
end |
@ -0,0 +1,4 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopRequestedResourcesHelperTest < ActionView::TestCase |
|||
end |
@ -0,0 +1,7 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventTest < ActiveSupport::TestCase |
|||
# test "the truth" do |
|||
# assert true |
|||
# end |
|||
end |
@ -0,0 +1,7 @@ |
|||
require 'test_helper' |
|||
|
|||
class EventTypeTest < ActiveSupport::TestCase |
|||
# test "the truth" do |
|||
# assert true |
|||
# end |
|||
end |
@ -0,0 +1,7 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopFacilitatorTest < ActiveSupport::TestCase |
|||
# test "the truth" do |
|||
# assert true |
|||
# end |
|||
end |
@ -0,0 +1,7 @@ |
|||
require 'test_helper' |
|||
|
|||
class WorkshopRequestedResourceTest < ActiveSupport::TestCase |
|||
# test "the truth" do |
|||
# assert true |
|||
# end |
|||
end |
Loading…
Reference in new issue