refactored DomainConstraint and conference_controller_spec
use params id instead of OSEM_HOSTNAME to load conference
This commit is contained in:
parent
66b48be968
commit
835859e350
3 changed files with 18 additions and 9 deletions
|
|
@ -23,12 +23,17 @@ describe ConferencesController do
|
|||
get :show, id: conference.short_title
|
||||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
|
||||
it 'assigns correct conference from a custom domain' do
|
||||
context 'accessing conference via custom domain' do
|
||||
before do
|
||||
conference.update_attribute(:custom_domain, 'lvh.me')
|
||||
@request.host = 'lvh.me'
|
||||
end
|
||||
|
||||
it 'assigns correct conference' do
|
||||
get :show
|
||||
|
||||
expect(response).to render_template :show
|
||||
expect(assigns(:conference)).to eq conference
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue