OmniAuthHelper is better name than OauthHelper

Conflicts:
	app/models/user.rb
	spec/models/user_spec.rb
openid
Marcin Kulik 12 years ago committed by Marcin Kulik
parent e34b2859a5
commit 769acb6593

@ -28,7 +28,7 @@ class OmniAuthUserLoader
user.uid = omniauth['uid']
user.nickname = omniauth['info']['nickname']
user.name = omniauth['info']['name']
user.avatar_url = OauthHelper.get_avatar_url(omniauth)
user.avatar_url = OmniAuthHelper.get_avatar_url(omniauth)
user
end

@ -1,4 +1,4 @@
class OauthHelper
class OmniAuthHelper
def self.get_avatar_url(auth)
if auth["provider"] == "twitter"

@ -1,6 +1,6 @@
require 'spec_helper'
describe OauthHelper do
describe OmniAuthHelper do
describe ".avatar_url" do
let(:avatar_url) { "http://foo.bar/foo.png" }
@ -16,7 +16,7 @@ describe OauthHelper do
}
end
it { OauthHelper.get_avatar_url(auth).should == avatar_url }
it { OmniAuthHelper.get_avatar_url(auth).should == avatar_url }
end
@ -30,7 +30,7 @@ describe OauthHelper do
}
end
it { OauthHelper.get_avatar_url(auth).should == avatar_url }
it { OmniAuthHelper.get_avatar_url(auth).should == avatar_url }
end
context "when other provider" do
@ -38,7 +38,7 @@ describe OauthHelper do
{ "provider" => "other" }
end
it { OauthHelper.get_avatar_url(auth).should be_nil }
it { OmniAuthHelper.get_avatar_url(auth).should be_nil }
end
end
end
Loading…
Cancel
Save