post :create, :issue_id => 1,
:relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''}
end
- relation = IssueRelation.first(:order => 'id DESC')
+ relation = IssueRelation.order('id DESC').first
assert_equal 1, relation.issue_from_id
assert_equal 2, relation.issue_to_id
assert_equal 'relates', relation.relation_type
assert_template 'create'
assert_equal 'text/javascript', response.content_type
end
- relation = IssueRelation.first(:order => 'id DESC')
+ relation = IssueRelation.order('id DESC').first
assert_equal 3, relation.issue_from_id
assert_equal 1, relation.issue_to_id
post :create, :issue_id => 1,
:relation => {:issue_to_id => '#2', :relation_type => 'relates', :delay => ''}
end
- relation = IssueRelation.first(:order => 'id DESC')
+ relation = IssueRelation.order('id DESC').first
assert_equal 2, relation.issue_to_id
end
post :create, :issue_id => 1,
:relation => {:issue_to_id => ' 2 ', :relation_type => 'relates', :delay => ''}
end
- relation = IssueRelation.first(:order => 'id DESC')
+ relation = IssueRelation.order('id DESC').first
assert_equal 2, relation.issue_to_id
end