Fix view test for cfps
This commit is contained in:
parent
c482d88e3a
commit
7cd21bbf11
3 changed files with 10 additions and 2 deletions
2
Gemfile
2
Gemfile
|
|
@ -123,4 +123,6 @@ group :test do
|
||||||
gem 'poltergeist'
|
gem 'poltergeist'
|
||||||
# Set of rails validations matchers to describe models
|
# Set of rails validations matchers to describe models
|
||||||
gem 'shoulda'
|
gem 'shoulda'
|
||||||
|
# Extracted from RSpec 3 stub_model and mock_model
|
||||||
|
gem 'rspec-activemodel-mocks'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,10 @@ GEM
|
||||||
rspec-core (~> 3.0.0)
|
rspec-core (~> 3.0.0)
|
||||||
rspec-expectations (~> 3.0.0)
|
rspec-expectations (~> 3.0.0)
|
||||||
rspec-mocks (~> 3.0.0)
|
rspec-mocks (~> 3.0.0)
|
||||||
|
rspec-activemodel-mocks (1.0.1)
|
||||||
|
activemodel (>= 3.0)
|
||||||
|
activesupport (>= 3.0)
|
||||||
|
rspec-mocks (>= 2.99, < 4.0)
|
||||||
rspec-core (3.0.2)
|
rspec-core (3.0.2)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.0.0)
|
||||||
rspec-expectations (3.0.2)
|
rspec-expectations (3.0.2)
|
||||||
|
|
@ -420,6 +424,7 @@ DEPENDENCIES
|
||||||
rails-observers
|
rails-observers
|
||||||
rdoc-generator-fivefish
|
rdoc-generator-fivefish
|
||||||
redcarpet
|
redcarpet
|
||||||
|
rspec-activemodel-mocks
|
||||||
rspec-rails
|
rspec-rails
|
||||||
rubocop
|
rubocop
|
||||||
sass-rails (>= 4.0.2)
|
sass-rails (>= 4.0.2)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'admin/callforpapers/show' do
|
describe 'admin/callforpapers/show' do
|
||||||
|
|
||||||
it 'renders callforpapers details' do
|
it 'renders callforpapers details' do
|
||||||
|
|
@ -8,8 +9,8 @@ describe 'admin/callforpapers/show' do
|
||||||
end_date: Date.today + 7.days,
|
end_date: Date.today + 7.days,
|
||||||
description: 'Lorem Ipsum Dolsum')
|
description: 'Lorem Ipsum Dolsum')
|
||||||
render
|
render
|
||||||
expect(rendered).to include("#{Date.today}")
|
expect(rendered).to include(Date.today.strftime('%Y-%m-%d'))
|
||||||
expect(rendered).to include("#{Date.today + 7.days}")
|
expect(rendered).to include(7.days.from_now.strftime('%Y-%m-%d'))
|
||||||
expect(rendered).to include('Lorem Ipsum Dolsum')
|
expect(rendered).to include('Lorem Ipsum Dolsum')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue