diff --git a/test/dummy/app/controllers/test_controller.rb b/test/dummy/app/controllers/test_controller.rb
index <HASH>..<HASH> 100644
--- a/test/dummy/app/controllers/test_controller.rb
+++ b/test/dummy/app/controllers/test_controller.rb
@@ -2,5 +2,10 @@
 class TestController < ApplicationController
   def html_page
     
+  end 
+  
+  def json_page
+    @json_response_text = '{lorem:"ipsum"}'
+    render text: @json_response_text
   end
 end
\ No newline at end of file
diff --git a/test/ganalytics_test.rb b/test/ganalytics_test.rb
index <HASH>..<HASH> 100644
--- a/test/ganalytics_test.rb
+++ b/test/ganalytics_test.rb
@@ -12,7 +12,11 @@ class GanalyticsTest < ActionController::TestCase
   
   test "Put Google Analytics tracking code code before the closing </head> tag" do
     get :html_page
-    response_body = @response.body
-    assert_match Ganalytics::Codes.tracking_code+'</head>', response_body
+    assert_match Ganalytics::Codes.tracking_code+'</head>', @response.body
+  end
+  
+  test "Put Google Analytics tracking code to site without </head> tag does nothing" do
+    get :json_page
+    assert_equal @response.body, assigns(:json_response_text)
   end
 end
test when there is no </head> tag do nothing