mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Removes column hard_deadline from call for papers
This commit is contained in:
parent
25a1c116fd
commit
c75471c0e4
7 changed files with 13 additions and 17 deletions
|
|
@ -1,10 +1,10 @@
|
|||
class CallForPapers < ActiveRecord::Base
|
||||
attr_accessible :start_date, :end_date, :hard_deadline,
|
||||
attr_accessible :start_date, :end_date,
|
||||
:description, :schedule_changes, :rating,
|
||||
:schedule_public
|
||||
belongs_to :conference
|
||||
|
||||
validates_presence_of :start_date, :end_date, :hard_deadline
|
||||
validates_presence_of :start_date, :end_date
|
||||
validates :rating, :numericality => { :greater_than_or_equal_to => 0, :less_than_or_equal_to => 10 }
|
||||
|
||||
##
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
= semantic_form_for(@cfp, :url => admin_conference_callforpapers_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||
= f.input :description, :hint => "Welcome text for the Call for Papers"
|
||||
= f.input :schedule_changes
|
||||
= f.input :schedule_public
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
class RemoveHardDeadlineFromCallForPapers < ActiveRecord::Migration
|
||||
def up
|
||||
remove_column :call_for_papers, :hard_deadline
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :call_for_papers, :hard_deadline, :date
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20140530082708) do
|
||||
ActiveRecord::Schema.define(version: 20140604142949) do
|
||||
|
||||
create_table "answers", force: true do |t|
|
||||
t.string "title"
|
||||
|
|
@ -22,7 +22,6 @@ ActiveRecord::Schema.define(version: 20140530082708) do
|
|||
create_table "call_for_papers", force: true do |t|
|
||||
t.date "start_date", null: false
|
||||
t.date "end_date", null: false
|
||||
t.date "hard_deadline", null: false
|
||||
t.text "description", null: false
|
||||
t.integer "conference_id"
|
||||
t.datetime "created_at"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ FactoryGirl.define do
|
|||
factory :call_for_papers do
|
||||
start_date Date.today - 1
|
||||
end_date Date.today + 7
|
||||
hard_deadline Date.today + 8
|
||||
description 'We call for papers'
|
||||
conference
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,16 +19,13 @@ feature Conference do
|
|||
|
||||
expect(flash).
|
||||
to eq('Creating the call for papers failed. ' +
|
||||
"Start date can't be blank. End date can't be blank. " +
|
||||
"Hard deadline can't be blank.")
|
||||
"Start date can't be blank. End date can't be blank.")
|
||||
|
||||
today = Date.today - 1
|
||||
page.execute_script(
|
||||
"$('#conference-start-datepicker').val('#{today.strftime('%d/%m/%Y')}')")
|
||||
page.execute_script(
|
||||
"$('#conference-end-datepicker').val('#{(today + 7).strftime('%d/%m/%Y')}')")
|
||||
page.execute_script(
|
||||
"$('#cfp-hard-datepicker').val('#{(today + 8).strftime('%d/%m/%Y')}')")
|
||||
|
||||
fill_in 'call_for_papers_description', with: 'Cfp description'
|
||||
fill_in 'call_for_papers_rating', with: '4'
|
||||
|
|
@ -42,8 +39,6 @@ feature Conference do
|
|||
to eq(today.strftime('%Y-%m-%d'))
|
||||
expect(find('#conference-end-datepicker').value).
|
||||
to eq((today + 7).strftime('%Y-%m-%d'))
|
||||
expect(find('#cfp-hard-datepicker').value).
|
||||
to eq((today + 8).strftime('%Y-%m-%d'))
|
||||
expect(find('#call_for_papers_description').text).
|
||||
to eq('Cfp description')
|
||||
expect(find('#call_for_papers_rating').value).to eq('4')
|
||||
|
|
@ -73,8 +68,6 @@ feature Conference do
|
|||
"$('#conference-start-datepicker').val('#{today.strftime('%d/%m/%Y')}')")
|
||||
page.execute_script(
|
||||
"$('#conference-end-datepicker').val('#{(today + 14).strftime('%d/%m/%Y')}')")
|
||||
page.execute_script(
|
||||
"$('#cfp-hard-datepicker').val('#{(today + 28).strftime('%d/%m/%Y')}')")
|
||||
|
||||
fill_in 'call_for_papers_description', with: 'Updated description'
|
||||
fill_in 'call_for_papers_rating', with: '0'
|
||||
|
|
@ -87,8 +80,6 @@ feature Conference do
|
|||
to eq(today.strftime('%Y-%m-%d'))
|
||||
expect(find('#conference-end-datepicker').value).
|
||||
to eq((today + 14).strftime('%Y-%m-%d'))
|
||||
expect(find('#cfp-hard-datepicker').value).
|
||||
to eq((today + 28).strftime('%Y-%m-%d'))
|
||||
expect(find('#call_for_papers_description').text).
|
||||
to eq('Updated description')
|
||||
expect(find('#call_for_papers_rating').value).to eq('0')
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ describe 'admin/callforpapers/show' do
|
|||
assign :conference, @conference
|
||||
assign :cfp, stub_model(CallForPapers, start_date: Date.today,
|
||||
end_date: Date.today + 7.days,
|
||||
hard_deadline: Date.today + 6.days,
|
||||
description: 'Lorem Ipsum Dolsum')
|
||||
render
|
||||
expect(rendered).to include("#{Date.today}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue