Added Github authentication option, disabled by default with enable options in settings.

This commit is contained in:
nverba
2013-02-26 05:00:21 +00:00
committed by nverba
parent b50e0536c7
commit b45f872c04
18 changed files with 170 additions and 1 deletions
@@ -37,6 +37,18 @@ describe "users/omniauth_callbacks/complete.html.erb" do
rendered_data["auth_provider"].should eq("OpenId")
rendered_data["awaiting_activation"].should eq(true)
end
it "renders github data " do
assign(:data, {:username =>"username", :auth_provider=>"Github", :awaiting_activation=>true})
render
rendered_data = JSON.parse(rendered.match(/window.opener.Discourse.authenticationComplete\((.*)\)/)[1])
rendered_data["username"].should eq("username")
rendered_data["auth_provider"].should eq("Github")
rendered_data["awaiting_activation"].should eq(true)
end
end