class ClientApplicationTest
Public Instance Methods
setup()
click to toggle source
# File lib/generators/test_unit/templates/client_application_test.rb, line 17 def setup @application = ClientApplication.create :name=>"Agree2",:url=>"http://agree2.com",:user=>users(:quentin) create_consumer end
test_should_be_valid()
click to toggle source
# File lib/generators/test_unit/templates/client_application_test.rb, line 22 def test_should_be_valid assert @application.valid? end
test_should_have_credentials()
click to toggle source
# File lib/generators/test_unit/templates/client_application_test.rb, line 36 def test_should_have_credentials assert_not_nil @application.credentials assert_equal @application.key, @application.credentials.key assert_equal @application.secret, @application.credentials.secret end
test_should_have_key_and_secret()
click to toggle source
# File lib/generators/test_unit/templates/client_application_test.rb, line 31 def test_should_have_key_and_secret assert_not_nil @application.key assert_not_nil @application.secret end
test_should_not_have_errors()
click to toggle source
# File lib/generators/test_unit/templates/client_application_test.rb, line 27 def test_should_not_have_errors assert_equal [], @application.errors.full_messages end