public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
use default test.host domain where possible [courtenay]

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2554 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu Dec 14 02:03:05 -0800 2006
commit  b99279e06f009419277129716f83b634747d1d36
tree    ac135691d0f08bc7c0dd5bf46bb3d87a4b23c2fc
parent  84518a8d11662e51478911bd90009fc9aa6864a4
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@
0
 first:
0
   id: 1
0
   title: Mephisto
0
- host: test.com
0
+ host: test.host
0
   filter: textile_filter
0
   approve_comments: false
0
   comment_age: 30
...
12
13
14
15
 
16
17
18
...
20
21
22
23
 
24
25
26
27
28
29
 
30
31
32
33
34
35
 
36
37
38
39
40
41
 
42
43
44
...
12
13
14
 
15
16
17
18
...
20
21
22
 
23
24
25
26
27
28
 
29
30
31
32
33
34
 
35
36
37
38
39
40
 
41
42
43
44
0
@@ -12,7 +12,7 @@ end
0
 class ApplicationControllerTest < Test::Unit::TestCase
0
   fixtures :sites
0
   def setup
0
- @sub = Site.create!(:title => 'sub', :host => 'sub.test.com')
0
+ @sub = Site.create!(:title => 'sub', :host => 'sub.test.host')
0
     @uk = Site.create!(:title => 'sub', :host => 'sub.test.co.uk')
0
     @controller = AccountController.new
0
     @request = ActionController::TestRequest.new
0
@@ -20,25 +20,25 @@ class ApplicationControllerTest < Test::Unit::TestCase
0
   end
0
 
0
   def test_should_find_site_by_host
0
- host! 'test.com'
0
+ host! 'test.host'
0
     get :test_host
0
     assert_equal sites(:first), @controller.site
0
   end
0
 
0
   def test_should_find_site_with_www_prefix
0
- host! 'www.test.com'
0
+ host! 'www.test.host'
0
     get :test_host
0
     assert_equal sites(:first), @controller.site
0
   end
0
   
0
   def test_should_find_site_by_subdomain_and_host
0
- host! 'sub.test.com'
0
+ host! 'sub.test.host'
0
     get :test_host
0
     assert_equal @sub, @controller.site
0
   end
0
   
0
   def test_should_find_site_by_subdomain_and_host_with_www_prefix
0
- host! 'www.sub.test.com'
0
+ host! 'www.sub.test.host'
0
     get :test_host
0
     assert_equal @sub, @controller.site
0
   end
...
11
12
13
14
15
16
17
...
11
12
13
 
14
15
16
0
@@ -11,7 +11,6 @@ context "Mephisto Controller Redirections" do
0
     @controller = MephistoController.new
0
     @request = ActionController::TestRequest.new
0
     @response = ActionController::TestResponse.new
0
- host! 'test.com'
0
   end
0
 
0
   specify "should handle denied requests" do
...
12
13
14
15
16
17
18
...
12
13
14
 
15
16
17
0
@@ -12,7 +12,6 @@ class MephistoControllerTest < Test::Unit::TestCase
0
     @controller = MephistoController.new
0
     @request = ActionController::TestRequest.new
0
     @response = ActionController::TestResponse.new
0
- host! 'test.com'
0
   end
0
 
0
   def test_should_list_on_home
...
213
214
215
216
 
217
218
219
...
278
279
280
 
281
282
283
...
294
295
296
297
 
298
299
300
...
213
214
215
 
216
217
218
219
...
278
279
280
281
282
283
284
...
295
296
297
 
298
299
300
301
0
@@ -213,7 +213,7 @@ class Test::Unit::TestCase
0
       'value' => users(user).activation_code,
0
       'expires' => 2.weeks.from_now,
0
       'path' => '/',
0
- 'domain' => 'example.com'
0
+ 'domain' => 'test.host'
0
     ) : nil
0
   end
0
   
0
@@ -278,6 +278,7 @@ class ActionController::IntegrationTest
0
   # creates an anonymous session
0
   def visit
0
     open_session do |sess|
0
+ sess.host = 'test.host'
0
       sess.extend Mephisto::Integration::Actor
0
       yield sess if block_given?
0
     end
0
@@ -294,7 +295,7 @@ end
0
 
0
 class ActionController::Integration::Session
0
   def login_as(login)
0
- post '/account/login', :login => login, :password => 'test'
0
+ post 'http://test.host/account/login', :login => login, :password => 'test'
0
     assert request.session[:user]
0
     assert redirect?
0
   end
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@ context "Site" do
0
   end
0
   
0
   specify "should find by host" do
0
- assert_equal sites(:first), Site.find_by_host('test.com')
0
+ assert_equal sites(:first), Site.find_by_host('test.host')
0
     assert_equal sites(:hostess), Site.find_by_host('cupcake.com')
0
   end
0
 

Comments

    No one has commented yet.