Sha256: 0e748cf243a8b0450b944fb0f92453f0463c4249ade353695d34b307fcb45c23
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe NotificationsController do include SocialStream::TestHelpers render_views before do @user = Factory(:user) @actor = @user.actor sign_in @user @receipt = @user.notify("subject", "body", Factory(:activity)) end it "should render index" do get :index assert_response :success end it "should update read" do put :update, :id => @receipt.notification.to_param, :read => "Read" @receipt.notification.is_unread?(@actor).should==false assert_response :success end it "should update unread" do put :update, :id => @receipt.notification.to_param, :read => "Unread" @receipt.notification.is_unread?(@actor).should==true assert_response :success end it "should update all" do @receipt2 = @user.notify("subject", "body", Factory(:activity)) put :update_all @receipt.notification.is_unread?(@actor).should==false @receipt2.notification.is_unread?(@actor).should==false assert_response :success end it "should send to trash" do delete :destroy, :id => @receipt.notification.to_param @receipt.notification.is_trashed?(@actor).should==true response.should redirect_to notifications_path end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
social_stream-base-0.9.1 | spec/controllers/notifications_controller_spec.rb |