File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'Whitelabel' do
4
+ let ( :hamburg ) { Usergroup . from_name ( "hamburg" ) }
5
+ let ( :berlin ) { Usergroup . from_name ( "berlin" ) }
6
+ let ( :tokio ) { Usergroup . from_name ( "tokio" ) }
7
+
8
+ around do
9
+ whitelabel_backup = Whitelabel . labels
10
+ Whitelabel . labels = [
11
+ hamburg ,
12
+ berlin ,
13
+ tokio
14
+ ]
15
+ ensure
16
+ Whitelabel . labels = whitelabel_backup
17
+ end
18
+
19
+
4
20
context 'GET label page with non existing subdomain' do
5
21
it 'does not do an endless redirect but halts' do
6
22
host! 'www.onruby.test'
18
34
19
35
context 'GET page with custom domain' do
20
36
it 'shows the label' do
21
- host! 'www.colognerb .de'
37
+ host! 'www.tokio .de'
22
38
23
39
get root_url
24
40
expect ( response ) . to be_a_successful
25
- expect ( Whitelabel [ :label_id ] ) . to eql ( 'cologne' )
41
+ expect ( Whitelabel [ :label_id ] ) . to eql ( tokio . label_id )
26
42
end
27
43
end
28
44
end
You can’t perform that action at this time.
0 commit comments