Skip to content

Commit

Permalink
Merge branch 'github_flip_master'
Browse files Browse the repository at this point in the history
Conflicts:

	app/models/user/validation.rb
  • Loading branch information
courtenay committed Oct 9, 2008
2 parents 37884e0 + 571e611 commit 89fd2f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/controllers/topics_controller.rb
Expand Up @@ -79,6 +79,7 @@ def destroy

protected
def find_forum
current_site
@forum = Forum.find_by_permalink(params[:forum_id])
end

Expand Down
5 changes: 3 additions & 2 deletions app/models/user/validation.rb
Expand Up @@ -17,7 +17,8 @@ class User

# prevents a user from submitting a crafted form that bypasses activation
# anything else you want your user to change should be added here.
attr_accessible :login, :email, :password, :password_confirmation, :bio, :website, :display_name, :openid_url
attr_accessible :login, :email, :password, :password_confirmation, :bio,
:openid_url, :display_name, :website

# Encrypts some data with the salt.
def self.encrypt(password, salt)
Expand Down Expand Up @@ -53,4 +54,4 @@ def downcase_email_and_login
login.downcase!
email.downcase!
end
end
end
12 changes: 11 additions & 1 deletion spec/controllers/users_controller_spec.rb
Expand Up @@ -98,6 +98,16 @@ def create_user(options = {})

it_assigns :user, :flash => { :notice => :not_nil }
it_redirects_to { settings_path }

describe "updating from edit form" do
define_models :stubbed
%w(display_name openid_url website bio).each do |field|
it "should update #{field}" do
put :update, :id => @user.to_param, :user => { field, "test" }
assigns(:user).attributes[field].should == "test"
end
end
end
end

describe UsersController, "(successful save, xml)" do
Expand Down Expand Up @@ -129,4 +139,4 @@ def create_user(options = {})
assigns(:user).errors.to_xml
end
end
end
end

0 comments on commit 89fd2f2

Please sign in to comment.