Sha256: 209ead7488dda5011669dead16f481e48a16455a856fc729477bb23b8e3ad367
Contents?: true
Size: 846 Bytes
Versions: 12
Compression:
Stored size: 846 Bytes
Contents
require 'test_helper' class RepresenterTest < ActionController::TestCase include Roar::Rails::TestCase tests SingersController test "representers can use URL helpers" do get :show, :id => "bumi" assert_body "{\"name\":\"Bumi\",\"links\":[{\"rel\":\"self\",\"href\":\"http://http://roar.apotomo.de/singers/Bumi\"}]}" end test "it works with uninitialized config.representer.default_url_options" do url_options = Rails.application.config.representer.default_url_options begin Rails.application.config.representer.default_url_options = nil assert_raises RuntimeError, ArgumentError do get :show, :id => "bumi" end assert $!.message =~ /Missing host to link to/ rescue ensure Rails.application.config.representer.default_url_options = url_options end end end
Version data entries
12 entries across 12 versions & 1 rubygems