Sha256: 68b11d7b952a306ab92b297db5d65c56ee1a1b96017c171a320ea6d500778f8e

Contents?: true

Size: 706 Bytes

Versions: 43

Compression:

Stored size: 706 Bytes

Contents

require 'spec_helper'

describe RemoteSubject do
  describe "find_or_create_by_webfinger_uri" do
    before do
      @remote_subject = Factory(:remote_subject)
    end

    it "should find without acct:" do
      RemoteSubject.find_or_create_by_webfinger_uri!(@remote_subject.webfinger_id).should == @remote_subject
    end

    it "should find with acct:" do
      RemoteSubject.find_or_create_by_webfinger_uri!("acct:#{ @remote_subject.webfinger_id}").should == @remote_subject
    end

    it "should find with alias" do
      splt = @remote_subject.webfinger_id.split('@')
      uri = "http://#{ splt.last }/#{ splt.first }"

      RemoteSubject.find_or_create_by_webfinger_uri!(uri)
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
social_stream-ostatus-0.2.0 spec/models/remote_subject_spec.rb
social_stream-0.29.0 ostatus/spec/models/remote_subject_spec.rb
social_stream-ostatus-0.1.0 spec/models/remote_subject_spec.rb