add tests for controller

This commit is contained in:
nasia 2017-07-16 18:20:12 +03:00
parent 6831c000c9
commit 48a475ca12
4 changed files with 156 additions and 4 deletions

View file

@ -54,7 +54,7 @@ class Booth < ActiveRecord::Base
transitions to: :rejected, from: [:new, :to_reject]
end
event :cancel do
transitions to: :canceled, from: [:accepted, :rejected]
transitions to: :canceled, from: [:accepted, :rejected, :to_accept, :to_reject]
end
end

View file

@ -5,7 +5,7 @@
.row
.col-md-8
= semantic_form_for(@booth, url: @booth.new_record? ? admin_conference_booths_path(@conference.short_title) : admin_conference_booth_path(@conference.short_title, @booth.id), html: { multipart: true }) do |f|
= f.input :title, as: :string, required: true
= f.input :title, as: :string, autofocus: true, required: true
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
hint: 'This field becomes public upon request acceptance'
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,