FIX: badge granted titles were not being revoked when badge was revoked

This commit is contained in:
Sam
2014-10-08 10:26:18 +11:00
parent 2737575b9c
commit 0e7be81e60
7 changed files with 95 additions and 10 deletions

View File

@ -968,6 +968,13 @@ describe UsersController do
badge.update_attributes allow_title: true
xhr :put, :badge_title, user_badge_id: user_badge.id, username: user.username
user.reload.title.should == badge.name
user.user_profile.badge_granted_title.should == true
user.title = "testing"
user.save
user.user_profile.reload
user.user_profile.badge_granted_title.should == false
end
end