houndci fixes

This commit is contained in:
Gopesh Tulsyan 2014-05-19 12:49:04 +05:30
parent d1e9bd06a6
commit 7a19fefd53
24 changed files with 39 additions and 33 deletions

View file

@ -1,18 +1,20 @@
require 'spec_helper'
describe "admin/callforpapers/show" do
describe 'admin/callforpapers/show' do
it 'renders conference sidebar' do
assign :cfp, CallForPapers.new
expect(sidebar).to be true
end
it 'renders callforpapers details' do
@conference = create(:conference)
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")
end_date: Date.today + 7.days,
hard_deadline: Date.today + 6.days,
description: 'Lorem Ipsum Dolsum')
render
expect(rendered).to include("#{Date.today}")
expect(rendered).to include("#{Date.today + 7.days}")
expect(rendered).to include('Lorem Ipsum Dolsum')
end
end

View file

@ -1,9 +1,8 @@
require 'spec_helper'
describe "admin/conference/index" do
describe 'admin/conference/index' do
it 'renders all conference names with links' do
assign(:conferences, [create(:conference, title: 'OpenSUSE'),
create(:conference)])
assign(:conferences, [create(:conference, title: 'OpenSUSE'), create(:conference)])
render
expect(rendered).to include('OpenSUSE')
expect(rendered).to include("The dog and pony show")

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/conference/new" do
describe 'admin/conference/new' do
it 'renders the new template for the conference' do
assign(:conference, Conference.new)
render

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/conference/show" do
describe 'admin/conference/show' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/difficulty_levels/index" do
describe 'admin/difficulty_levels/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,23 +1,22 @@
require 'spec_helper'
describe "admin/emails/index" do
describe 'admin/emails/index' do
it 'renders conference sidebar' do
assign :settings, create(:email_settings)
expect(sidebar).to be true
end
it 'renders email templates' do
@conference = create(:conference)
assign :conference, @conference
@settings = create(:email_settings)
assign :settings, @settings
render
expect(rendered).to have_selector("input[type='checkbox'][value='1']",
:count=>4)
expect(rendered).to have_selector(
"input[checked='checked'][type='checkbox'][value='1']", :count=> 1)
expect(rendered).
to have_selector("input[type='checkbox'][value='1']", count: 4)
expect(rendered).
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 1)
expect(rendered).to include('Lorem Ipsum Dolsum')
expect(rendered).to include(
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
expect(rendered).
to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
end
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/eventtypes/index" do
describe 'admin/eventtypes/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,6 +1,5 @@
require 'spec_helper'
describe "admin/rooms/index" do
describe 'admin/rooms/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end
@ -11,4 +10,5 @@ describe "admin/rooms/index" do
expect(rendered).to include('Example Room')
expect(rendered).to include('4')
end
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/social_events/index" do
describe 'admin/social_events/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/supporter_levels/index" do
describe 'admin/supporter_levels/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/tracks/index" do
describe 'admin/tracks/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/venue/venue_info" do
describe 'admin/venue/venue_info' do
it 'renders conference sidebar' do
assign :venue, stub_model(Venue)
expect(sidebar).to be true

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe "admin/volunteers/index" do
describe 'admin/volunteers/index' do
it 'renders conference sidebar' do
expect(sidebar).to be true
end
@ -11,7 +11,7 @@ describe "admin/volunteers/index" do
assign :conference, @vday.conference
render
expect(rendered).to have_selector(
"input[checked='checked'][type='checkbox'][value='1']", count: 2)
"input[checked='checked'][type='checkbox'][value='1']", count: 2)
expect(rendered).to include("#{Date.today.strftime('%Y')}")
expect(rendered).to include("#{Date.today.strftime('%B')}")
expect(rendered).to include("#{Date.today.strftime('%d')}")
@ -21,7 +21,7 @@ describe "admin/volunteers/index" do
it 'renders volunteers positions as vpositions' do
@vposition = create(:vposition)
@vposition.conference.update_attributes(
use_vpositions: true, use_volunteers: true, use_vdays: true)
use_vpositions: true, use_volunteers: true, use_vdays: true)
assign :conference, @vposition.conference
render
expect(rendered).to include("#{Date.today}")