2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

BUGFIX: improve error messages for invalid API keys

BUGFIX: don't track last seen for message bus
This commit is contained in:
Sam 2014-05-22 09:01:29 +10:00
parent 7fee3d7f8f
commit eeef775f21
6 changed files with 94 additions and 40 deletions

View file

@ -59,7 +59,7 @@ describe UserBadgesController do
it 'grants badges from master api calls' do
api_key = Fabricate(:api_key)
StaffActionLogger.any_instance.expects(:log_badge_grant).never
xhr :post, :create, badge_id: badge.id, username: user.username, api_key: api_key.key
xhr :post, :create, badge_id: badge.id, username: user.username, api_key: api_key.key, api_username: "system"
response.status.should == 200
user_badge = UserBadge.find_by(user: user, badge: badge)
user_badge.should be_present