Having a table with a column called ID that is only part of the primary key really doesn't work as rails likes to treat ID as a special name so it becomes impossible to assign to it or read it.
19 lines
578 B
Ruby
19 lines
578 B
Ruby
require File.dirname(__FILE__) + '/../test_helper'
|
|
require 'old_relation_controller'
|
|
|
|
class OldRelationControllerTest < ActionController::TestCase
|
|
api_fixtures
|
|
|
|
# -------------------------------------
|
|
# Test reading old relations.
|
|
# -------------------------------------
|
|
def test_history
|
|
# check that a visible relations is returned properly
|
|
get :history, :id => relations(:visible_relation).relation_id
|
|
assert_response :success
|
|
|
|
# check chat a non-existent relations is not returned
|
|
get :history, :id => 0
|
|
assert_response :not_found
|
|
end
|
|
end
|