mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 06:13:43 +08:00
16 lines
319 B
Ruby
16 lines
319 B
Ruby
|
require 'spec_helper'
|
||
|
|
||
|
describe BadgesController do
|
||
|
let!(:badge) { Fabricate(:badge) }
|
||
|
|
||
|
context 'index' do
|
||
|
it 'should return a list of all badges' do
|
||
|
xhr :get, :index
|
||
|
|
||
|
response.status.should == 200
|
||
|
parsed = JSON.parse(response.body)
|
||
|
parsed["badges"].length.should == 1
|
||
|
end
|
||
|
end
|
||
|
end
|