Get rid of the home controller
This commit is contained in:
parent
a41f76cca1
commit
e65ca7fb58
11 changed files with 64 additions and 56 deletions
|
|
@ -3,6 +3,13 @@ require 'spec_helper'
|
|||
describe ConferenceController do
|
||||
let(:conference) { create(:conference, splashpage: create(:splashpage, public: true)) }
|
||||
|
||||
describe 'GET #index' do
|
||||
it 'Response code is 200' do
|
||||
get :index
|
||||
expect(response.response_code).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #show' do
|
||||
context 'conference made public' do
|
||||
it 'assigns the requested conference to conference' do
|
||||
|
|
@ -28,4 +35,12 @@ describe ConferenceController do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'OPTIONS #index' do
|
||||
it 'Response code is 200' do
|
||||
process :index, 'OPTIONS'
|
||||
expect(response.response_code).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe HomeController do
|
||||
let(:conference) { create(:conference) }
|
||||
describe 'GET #index' do
|
||||
it 'Response code is 200' do
|
||||
get :index
|
||||
expect(response.response_code).to eq(200)
|
||||
end
|
||||
|
||||
it 'Assigns conference' do
|
||||
get :index
|
||||
expect(assigns(:current)).to eq [conference]
|
||||
end
|
||||
|
||||
it 'Assigns only pending conferences' do
|
||||
create(:conference,
|
||||
end_date: Date.today - 7,
|
||||
start_date: Date.today - 14)
|
||||
get :index
|
||||
expect(assigns(:current)).to eq [conference]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe 'OPTIONS #index' do
|
||||
it 'Response code is 200' do
|
||||
process :index, 'OPTIONS'
|
||||
expect(response.response_code).to eq(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue