mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
Merge branch 'github-auth' of git://github.com/nverba/discourse
Conflicts: config/locales/server.en.yml db/structure.sql spec/views/omniauth_callbacks/complete.html.erb_spec.rb
This commit is contained in:
commit
007118b00c
18 changed files with 183 additions and 15 deletions
|
@ -38,6 +38,18 @@ describe "users/omniauth_callbacks/complete.html.erb" do
|
|||
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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue