Sha256: a8d51a9bd64b2580ec6d859054e54fcbf63e8af4fe4b17256cece7a95e1c499b
Contents?: true
Size: 1.41 KB
Versions: 5
Compression:
Stored size: 1.41 KB
Contents
require 'helper' class TestUser < Test::Unit::TestCase def setup @client = Whatser::Client.new @user = Whatser::User.new end def test_to_params user = Whatser::User.new params = [:name,:avatar_pic,:location,:bio,:email] params.each do |p| assert user.to_params.keys.include?(p) end end def test_me assert @client.users.me.is_a?(Whatser::Response) end def test_suggested assert @client.users.suggested.is_a?(Whatser::Response) end def test_find assert @client.users.find(1, :opt => 'test').is_a?(Whatser::Response) end def test_search assert @client.users.search(:opt => 'test').is_a?(Whatser::Response) end def test_anonymous assert @client.users.anonymous.is_a?(Whatser::Response) end def test_invite assert @client.users.invite( :emails => 'first@example.com;second@example.com' ).is_a?(Whatser::Response) end def test_create assert @client.users.create(:name => 'test', :email => 'test@example.com', :password => '123pass').is_a?(Whatser::Response) end def test_connection assert @user.connection.is_a?(Whatser::Response) end def test_thanks assert @user.thanks(1, :opt => 'test').is_a?(Whatser::Response) end def test_save assert @user.save.is_a?(Whatser::Response) end def test_save_and_update @user.id = 1 assert @user.save.is_a?(Whatser::Response) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
whatser-0.5.0 | test/test_user.rb |
whatser-0.4.0 | test/test_user.rb |
whatser-0.3.2 | test/test_user.rb |
whatser-0.3.1 | test/test_user.rb |
whatser-0.3.0 | test/test_user.rb |