Refactored profile to resource. Added missing flash notice on successfull updated. Update username via ajax

This commit is contained in:
Dmitriy Zaporozhets 2012-12-02 13:29:24 +02:00
parent 2be5e6d443
commit 46bf3a0949
14 changed files with 95 additions and 56 deletions

View file

@ -29,7 +29,16 @@ describe "Users Security" do
end
describe "GET /profile/account" do
subject { profile_account_path }
subject { account_profile_path }
it { should be_allowed_for @u1 }
it { should be_allowed_for :admin }
it { should be_allowed_for :user }
it { should be_denied_for :visitor }
end
describe "GET /profile/design" do
subject { design_profile_path }
it { should be_allowed_for @u1 }
it { should be_allowed_for :admin }