mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 11:32:24 -05:00
23 lines
397 B
Ruby
23 lines
397 B
Ruby
|
require 'spec_helper'
|
||
|
|
||
|
describe NotificationsController do
|
||
|
|
||
|
context 'when logged in' do
|
||
|
let!(:user) { log_in }
|
||
|
|
||
|
before do
|
||
|
xhr :get, :index
|
||
|
end
|
||
|
|
||
|
subject { response }
|
||
|
it { should be_success }
|
||
|
end
|
||
|
|
||
|
context 'when not logged in' do
|
||
|
it 'should raise an error' do
|
||
|
lambda { xhr :get, :index }.should raise_error(Discourse::NotLoggedIn)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|