FIX: only allow badge title selection if it exists

This commit is contained in:
Sam
2014-07-09 15:31:49 +10:00
parent e32e96dabb
commit 8fcc019ff8
4 changed files with 15 additions and 4 deletions

View File

@ -11,8 +11,12 @@ describe UsersController do
let!(:user) { log_in }
it 'returns success' do
xhr :get, :show, username: user.username
xhr :get, :show, username: user.username, format: :json
response.should be_success
json = JSON.parse(response.body)
json["user"]["has_title_badges"].should == false
end
it "returns not found when the username doesn't exist" do