Sha256: 824429dcab37688480effe9db4cf22d8370f912537dc1c08ecb04eed2a51f652

Contents?: true

Size: 846 Bytes

Versions: 1

Compression:

Stored size: 846 Bytes

Contents

require 'spec_helper'

describe Openname, :vcr => { :cassette_name => "openname" }  do
 
  
  it "should have a default endpoint" do
    Openname.endpoint.should == "https://www.onename.io"
  end
  
  it "should allow setting a different endpoint and returning to default" do
    Openname.endpoint = "https://www.example.com"
    Openname.endpoint.should == "https://www.example.com"
    Openname.endpoint = nil
    Openname.endpoint.should == "https://www.onename.io"
  end
  
  it "should retrieve openname user" do 
    user = Openname.get("larry")
    user.is_a?(Openname::User).should == true
  end
    
    context "we've retrieved an openname user" do 
      before :each do 
        @user = Openname.get("larry")
      end
      
      it "should have a openname" do 
        @user.openname.should == "larry"
      end
      
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openname-0.3 spec/lib/onename_spec.rb