From 8a794b480d3669ab02a557564a156316a93a4a30 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Mon, 12 May 2008 15:28:34 +0000 Subject: [PATCH] fixes rest_api page as reported on mailing list. Thanks Eric Allen for the fix! git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@842 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/integrations/rest_api.html.erb | 2 +- tracks/test/functional/integrations_controller_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tracks/app/views/integrations/rest_api.html.erb b/tracks/app/views/integrations/rest_api.html.erb index da6177d2..0012d7e6 100644 --- a/tracks/app/views/integrations/rest_api.html.erb +++ b/tracks/app/views/integrations/rest_api.html.erb @@ -196,7 +196,7 @@ Loading development environment (Rails 1.2.4)
 
-$ SITE="http://username:p4ssw0rd@<%= @request.host_with_port %>" irb \
+$ SITE="http://username:p4ssw0rd@<%= request.host_with_port %>" irb \
     -r tracks_api_wrapper.rb
 
 irb(main):001:0> inbox = Tracks::Context.find :first
diff --git a/tracks/test/functional/integrations_controller_test.rb b/tracks/test/functional/integrations_controller_test.rb
index 0759e9db..01019d82 100644
--- a/tracks/test/functional/integrations_controller_test.rb
+++ b/tracks/test/functional/integrations_controller_test.rb
@@ -5,6 +5,8 @@ require 'integrations_controller'
 class IntegrationsController; def rescue_action(e) raise e end; end
 
 class IntegrationsControllerTest < Test::Unit::TestCase
+  fixtures :users, :preferences, :projects, :contexts, :todos, :tags, :taggings
+
   def setup
     @controller = IntegrationsController.new
     @request    = ActionController::TestRequest.new
@@ -15,4 +17,11 @@ class IntegrationsControllerTest < Test::Unit::TestCase
   def test_truth
     assert true
   end
+  
+  def test_page_load
+    login_as(:admin_user)
+    get :rest_api
+    assert_response :success
+  end
+  
 end