This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/notifications_controller_spec.rb
2013-02-05 14:16:51 -05:00

22 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