houndci fixes
This commit is contained in:
parent
d1e9bd06a6
commit
7a19fefd53
24 changed files with 39 additions and 33 deletions
|
|
@ -35,7 +35,7 @@ describe Admin::ConferenceController do
|
||||||
it 'redirects to the updated conference' do
|
it 'redirects to the updated conference' do
|
||||||
patch :update, id: conference.short_title, conference:
|
patch :update, id: conference.short_title, conference:
|
||||||
attributes_for(:conference, title: 'Example Con')
|
attributes_for(:conference, title: 'Example Con')
|
||||||
conference.reload
|
conference.reload
|
||||||
expect(response).to redirect_to admin_conference_path(
|
expect(response).to redirect_to admin_conference_path(
|
||||||
conference.short_title)
|
conference.short_title)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :conference do
|
factory :conference do
|
||||||
title 'The dog and pony show'
|
title 'The dog and pony show'
|
||||||
sequence(:short_title) { |n| "dps#{n}14"}
|
sequence(:short_title) { |n| "dps#{n}14" }
|
||||||
social_tag 'dps14'
|
social_tag 'dps14'
|
||||||
timezone 'Amsterdam'
|
timezone 'Amsterdam'
|
||||||
contact_email 'admin@example.com'
|
contact_email 'admin@example.com'
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@ FactoryGirl.define do
|
||||||
color '#ffffff'
|
color '#ffffff'
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -4,4 +4,5 @@ FactoryGirl.define do
|
||||||
size 4
|
size 4
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -5,4 +5,5 @@ FactoryGirl.define do
|
||||||
date Date.today
|
date Date.today
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -4,4 +4,5 @@ FactoryGirl.define do
|
||||||
url 'www.example.com'
|
url 'www.example.com'
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -5,4 +5,5 @@ FactoryGirl.define do
|
||||||
color '#ffffff'
|
color '#ffffff'
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -4,4 +4,5 @@ FactoryGirl.define do
|
||||||
description 'Lorem Ipsum dolsum'
|
description 'Lorem Ipsum dolsum'
|
||||||
conference
|
conference
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -8,4 +8,5 @@ FactoryGirl.define do
|
||||||
vposition.vdays << build(:vday, conference: vposition.conference)
|
vposition.vdays << build(:vday, conference: vposition.conference)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -2,7 +2,6 @@ module Sidebar
|
||||||
def sidebar
|
def sidebar
|
||||||
@conference = create(:conference)
|
@conference = create(:conference)
|
||||||
assign :conference, @conference
|
assign :conference, @conference
|
||||||
assign :cfp, CallForPapers.new
|
|
||||||
render
|
render
|
||||||
expect(view).to render_template('admin/conference/_sidebar')
|
expect(view).to render_template('admin/conference/_sidebar')
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
describe 'admin/callforpapers/show' do
|
||||||
describe "admin/callforpapers/show" do
|
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
|
assign :cfp, CallForPapers.new
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
it 'renders callforpapers details' do
|
it 'renders callforpapers details' do
|
||||||
@conference = create(:conference)
|
@conference = create(:conference)
|
||||||
assign :conference, @conference
|
assign :conference, @conference
|
||||||
assign :cfp, stub_model(CallForPapers, start_date: Date.today,
|
assign :cfp, stub_model(CallForPapers, start_date: Date.today,
|
||||||
end_date: Date.today + 7.days,
|
end_date: Date.today + 7.days,
|
||||||
hard_deadline: Date.today + 6.days, description: "Lorem Ipsum Dolsum")
|
hard_deadline: Date.today + 6.days,
|
||||||
|
description: 'Lorem Ipsum Dolsum')
|
||||||
render
|
render
|
||||||
expect(rendered).to include("#{Date.today}")
|
expect(rendered).to include("#{Date.today}")
|
||||||
expect(rendered).to include("#{Date.today + 7.days}")
|
expect(rendered).to include("#{Date.today + 7.days}")
|
||||||
expect(rendered).to include('Lorem Ipsum Dolsum')
|
expect(rendered).to include('Lorem Ipsum Dolsum')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/conference/index" do
|
describe 'admin/conference/index' do
|
||||||
it 'renders all conference names with links' do
|
it 'renders all conference names with links' do
|
||||||
assign(:conferences, [create(:conference, title: 'OpenSUSE'),
|
assign(:conferences, [create(:conference, title: 'OpenSUSE'), create(:conference)])
|
||||||
create(:conference)])
|
|
||||||
render
|
render
|
||||||
expect(rendered).to include('OpenSUSE')
|
expect(rendered).to include('OpenSUSE')
|
||||||
expect(rendered).to include("The dog and pony show")
|
expect(rendered).to include("The dog and pony show")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/conference/new" do
|
describe 'admin/conference/new' do
|
||||||
it 'renders the new template for the conference' do
|
it 'renders the new template for the conference' do
|
||||||
assign(:conference, Conference.new)
|
assign(:conference, Conference.new)
|
||||||
render
|
render
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/conference/show" do
|
describe 'admin/conference/show' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/difficulty_levels/index" do
|
describe 'admin/difficulty_levels/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,22 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
describe 'admin/emails/index' do
|
||||||
describe "admin/emails/index" do
|
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
assign :settings, create(:email_settings)
|
assign :settings, create(:email_settings)
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders email templates' do
|
it 'renders email templates' do
|
||||||
@conference = create(:conference)
|
@conference = create(:conference)
|
||||||
assign :conference, @conference
|
assign :conference, @conference
|
||||||
@settings = create(:email_settings)
|
@settings = create(:email_settings)
|
||||||
assign :settings, @settings
|
assign :settings, @settings
|
||||||
render
|
render
|
||||||
expect(rendered).to have_selector("input[type='checkbox'][value='1']",
|
expect(rendered).
|
||||||
:count=>4)
|
to have_selector("input[type='checkbox'][value='1']", count: 4)
|
||||||
expect(rendered).to have_selector(
|
expect(rendered).
|
||||||
"input[checked='checked'][type='checkbox'][value='1']", :count=> 1)
|
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 Dolsum')
|
||||||
expect(rendered).to include(
|
expect(rendered).
|
||||||
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
|
to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/eventtypes/index" do
|
describe 'admin/eventtypes/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
describe 'admin/rooms/index' do
|
||||||
describe "admin/rooms/index" do
|
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
@ -11,4 +10,5 @@ describe "admin/rooms/index" do
|
||||||
expect(rendered).to include('Example Room')
|
expect(rendered).to include('Example Room')
|
||||||
expect(rendered).to include('4')
|
expect(rendered).to include('4')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/social_events/index" do
|
describe 'admin/social_events/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/supporter_levels/index" do
|
describe 'admin/supporter_levels/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/tracks/index" do
|
describe 'admin/tracks/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/venue/venue_info" do
|
describe 'admin/venue/venue_info' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
assign :venue, stub_model(Venue)
|
assign :venue, stub_model(Venue)
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "admin/volunteers/index" do
|
describe 'admin/volunteers/index' do
|
||||||
it 'renders conference sidebar' do
|
it 'renders conference sidebar' do
|
||||||
expect(sidebar).to be true
|
expect(sidebar).to be true
|
||||||
end
|
end
|
||||||
|
|
@ -11,7 +11,7 @@ describe "admin/volunteers/index" do
|
||||||
assign :conference, @vday.conference
|
assign :conference, @vday.conference
|
||||||
render
|
render
|
||||||
expect(rendered).to have_selector(
|
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('%Y')}")
|
||||||
expect(rendered).to include("#{Date.today.strftime('%B')}")
|
expect(rendered).to include("#{Date.today.strftime('%B')}")
|
||||||
expect(rendered).to include("#{Date.today.strftime('%d')}")
|
expect(rendered).to include("#{Date.today.strftime('%d')}")
|
||||||
|
|
@ -21,7 +21,7 @@ describe "admin/volunteers/index" do
|
||||||
it 'renders volunteers positions as vpositions' do
|
it 'renders volunteers positions as vpositions' do
|
||||||
@vposition = create(:vposition)
|
@vposition = create(:vposition)
|
||||||
@vposition.conference.update_attributes(
|
@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
|
assign :conference, @vposition.conference
|
||||||
render
|
render
|
||||||
expect(rendered).to include("#{Date.today}")
|
expect(rendered).to include("#{Date.today}")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "home/index" do
|
describe 'home/index' do
|
||||||
it "renders _conference partial for each conference" do
|
it "renders _conference partial for each conference" do
|
||||||
assign(:current, [create(:conference), create(:conference)])
|
assign(:current, [create(:conference), create(:conference)])
|
||||||
render
|
render
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue