Sha256: 00e64936aafb0b5e44429a937a4f171326d95d717be422604b050eb27445c30a
Contents?: true
Size: 940 Bytes
Versions: 3
Compression:
Stored size: 940 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 expected = "https://graph.facebook.com/#{id}/picture" expect(subject.remote_url).to eq(expected) end end end context "with a valid user name" do let(:id) { "ryandtownsend" } describe "#remote_url" do it "should return a valid URL" do expected = "https://graph.facebook.com/#{id}/picture" expect(subject.remote_url).to eq(expected) 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
3 entries across 3 versions & 1 rubygems