Sha256: 0ce3b4d0372916c7f1444b8155a0b9becc27d27678078341892a129d67d2d0a4
Contents?: true
Size: 1.58 KB
Versions: 10
Compression:
Stored size: 1.58 KB
Contents
require 'spec_helper' describe "Cloudfuji::User" do describe "valid?" do it "should post_command to valid_unity_url with email and pass in params" do params = {:email => "test@example.com", :pass => "GoCloudfuji"} Cloudfuji::Command.should_receive(:post_command).with(Cloudfuji::Base.valid_unity_url, params) Cloudfuji::User.valid?(params[:email], params[:pass]) end end describe "exists?" do it "should post_command to exists_unity_url with email in params" do params = {:email => "test@example.com"} Cloudfuji::Command.should_receive(:post_command).with(Cloudfuji::Base.exists_unity_url, params) Cloudfuji::User.exists?(params[:email]) end end describe "invite" do it "should post_command to invite_unity_url with email in params" do params = {:email => "test@example.com"} Cloudfuji::Command.should_receive(:post_command).with(Cloudfuji::Base.invite_unity_url, params) Cloudfuji::User.invite(params[:email]) end end describe "pending_invites" do it "should get_command from pending_invites_url with no params" do params = {} Cloudfuji::Command.should_receive(:get_command).with(Cloudfuji::Base.pending_invites_unity_url, params) Cloudfuji::User.pending_invites() end end describe "remove" do it "should post_command to remove_unity_url with ido_id in params" do params = {:ido_id => "some_random_ido_id"} Cloudfuji::Command.should_receive(:post_command).with(Cloudfuji::Base.remove_unity_url, params) Cloudfuji::User.remove(params[:ido_id]) end end end
Version data entries
10 entries across 10 versions & 1 rubygems