Skip to content

Commit

Permalink
add test for Base#first
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Dec 16, 2010
1 parent 989605c commit 9c1a6b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_sugarcrm.rb
Expand Up @@ -74,6 +74,13 @@ class TestSugarCRM < Test::Unit::TestCase
#SugarCRM.connection.debug = false
end

should "support finding first instance (sorted by attribute)" do
account = SugarCRM::Account.first({
:order_by => 'name'
})
assert_instance_of SugarCRM::Account, account
end

should "support searching based on conditions" do
accounts = SugarCRM::Account.all({
:conditions => { :billing_address_postalcode => ["> '70000'", "< '72000'" ] },
Expand Down

0 comments on commit 9c1a6b7

Please sign in to comment.