mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Merge pull request #2835 from techAPJ/patch-2
add user email on account created page
This commit is contained in:
@@ -356,6 +356,9 @@ describe UsersController do
|
||||
post_user
|
||||
|
||||
expect(JSON.parse(response.body)['active']).to be_falsey
|
||||
|
||||
# should save user_created_email in session
|
||||
session["user_created_email"].should == @user.email
|
||||
end
|
||||
|
||||
context "and 'must approve users' site setting is enabled" do
|
||||
@@ -389,6 +392,9 @@ describe UsersController do
|
||||
it 'enqueues a welcome email' do
|
||||
User.any_instance.expects(:enqueue_welcome_message).with('welcome_user')
|
||||
post_user
|
||||
|
||||
# should save user_created_email in session
|
||||
session["user_created_email"].should == @user.email
|
||||
end
|
||||
|
||||
it "shows the 'active' message" do
|
||||
@@ -471,6 +477,9 @@ describe UsersController do
|
||||
xhr :post, :create, create_params
|
||||
json = JSON::parse(response.body)
|
||||
json["success"].should == true
|
||||
|
||||
# should not change the session
|
||||
session["user_created_email"].should be_blank
|
||||
end
|
||||
end
|
||||
|
||||
@@ -512,6 +521,9 @@ describe UsersController do
|
||||
xhr :post, :create, create_params
|
||||
json = JSON::parse(response.body)
|
||||
json["success"].should_not == true
|
||||
|
||||
# should not change the session
|
||||
session["user_created_email"].should be_blank
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user