Sha256: c00ba94d48d5e7a3c7b2b01f7a23171aeda6aff6d92b7d6f85ef084a8a6b915d

Contents?: true

Size: 1.04 KB

Versions: 80

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

describe SettingsController do
  include SocialStream::TestHelpers
  render_views

  before do
    @user = Factory(:user)
    @actor = @user.actor
    sign_in @user
  end

  it "should render index" do
    get :index
    assert_response :success
  end

  it "should render index after update_all" do
    put :update_all
    assert_response :success
  end

  describe "Notification settings" do
    it "update notification email settings to Never" do
      @actor.update_attributes(:notify_by_email => true)
      @actor.notify_by_email.should==true
      put :update_all, :settings_section => "notifications", :notify_by_email => "never"
      @actor.reload
      @actor.notify_by_email.should==false

    end

    it "update notification email settings to Always" do
      @actor.update_attributes(:notify_by_email => false)
      @actor.notify_by_email.should==false
      put :update_all, :settings_section => "notifications", :notify_by_email => "always"
      @actor.reload
      @actor.notify_by_email.should==true
    end
  end
end

Version data entries

80 entries across 80 versions & 4 rubygems

Version Path
vkhater-social_stream-0.16.3.3 base/spec/controllers/settings_controller_spec.rb
vkhater-social_stream-base-0.11.2 spec/controllers/settings_controller_spec.rb
social_stream-0.16.3 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.11.2 spec/controllers/settings_controller_spec.rb
social_stream-0.16.2 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.11.1 spec/controllers/settings_controller_spec.rb
social_stream-0.16.1 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.11.0 spec/controllers/settings_controller_spec.rb
social_stream-0.15.8 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.10.11 spec/controllers/settings_controller_spec.rb
social_stream-0.15.7 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.10.10 spec/controllers/settings_controller_spec.rb
social_stream-0.15.6 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.10.9 spec/controllers/settings_controller_spec.rb
social_stream-0.15.5 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.10.8 spec/controllers/settings_controller_spec.rb
social_stream-0.15.4 base/spec/controllers/settings_controller_spec.rb
social_stream-base-0.10.7 spec/controllers/settings_controller_spec.rb
social_stream-0.15.1 base/spec/controllers/settings_controller_spec.rb
social_stream-0.15.0 base/spec/controllers/settings_controller_spec.rb