2014-05-19 12:24:48 +05:30
|
|
|
require 'spec_helper'
|
2014-07-04 22:55:01 +02:00
|
|
|
|
2014-05-19 12:49:04 +05:30
|
|
|
describe 'admin/callforpapers/show' do
|
2014-05-22 18:19:07 +02:00
|
|
|
|
2014-05-19 12:24:48 +05:30
|
|
|
it 'renders callforpapers details' do
|
|
|
|
|
@conference = create(:conference)
|
|
|
|
|
assign :conference, @conference
|
|
|
|
|
assign :cfp, stub_model(CallForPapers, start_date: Date.today,
|
2014-05-19 12:49:04 +05:30
|
|
|
end_date: Date.today + 7.days,
|
|
|
|
|
description: 'Lorem Ipsum Dolsum')
|
2014-05-19 12:24:48 +05:30
|
|
|
render
|
2014-07-04 22:55:01 +02:00
|
|
|
expect(rendered).to include(Date.today.strftime('%Y-%m-%d'))
|
|
|
|
|
expect(rendered).to include(7.days.from_now.strftime('%Y-%m-%d'))
|
2014-05-19 12:24:48 +05:30
|
|
|
expect(rendered).to include('Lorem Ipsum Dolsum')
|
|
|
|
|
end
|
2014-05-19 12:49:04 +05:30
|
|
|
|
2014-05-19 12:24:48 +05:30
|
|
|
end
|