mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Initial release of Discourse
This commit is contained in:
commit
21b5628528
2932 changed files with 143949 additions and 0 deletions
22
spec/controllers/notifications_controller_spec.rb
Normal file
22
spec/controllers/notifications_controller_spec.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue