Sha256: 03d0fb6cf6e88e27449a432aafb4b25a5c7f7fed48ab428b5f432f370dd225d3
Contents?: true
Size: 908 Bytes
Versions: 12
Compression:
Stored size: 908 Bytes
Contents
require "spec_helper" describe SocialAvatarProxy::FacebookAvatar do subject do SocialAvatarProxy::FacebookAvatar.new(id) end context "with a valid user ID" do let(:id) { "61413673" } describe "#remote_url" do it "should return a valid URL" do result = URI(subject.remote_url) expect(result.host).to eq("graph.facebook.com") end end end context "with a valid user name" do let(:id) { "ryandtownsend" } describe "#remote_url" do it "should return a valid URL" do result = URI(subject.remote_url) expect(result.host).to eq("graph.facebook.com") end end end context "with an invalid identifier" do let(:id) { "$omeInvalidN@me" } describe "#remote_url" do it "should raise an error" do expect { subject.remote_url }.to raise_error(RuntimeError) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems