Sha256: 74c71b4fad9b8c8055028fa773b6d6878f292018c898016f022893df5cbba215

Contents?: true

Size: 719 Bytes

Versions: 24

Compression:

Stored size: 719 Bytes

Contents

require 'core/spec_helper'

describe ZendeskAPI::Setting do
  it_should_be_readable :settings, :path => 'account/settings'

  under (user = ZendeskAPI::User.new(client, :id => 'me')) do
    it_should_be_readable user, :settings

    describe 'updating', :vcr do
      it 'should be updatable' do
        settings = user.settings
        lotus = settings.detect {|set| set.on == "lotus"}

        original_setting = lotus.keyboard_shortcuts_enabled
        lotus.keyboard_shortcuts_enabled = !original_setting

        settings.save!
        settings.fetch!(true)

        lotus = settings.detect {|set| set.on == "lotus"}
        lotus.keyboard_shortcuts_enabled.should == !original_setting
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
zendesk_api-1.3.9 spec/live/setting_spec.rb
zendesk_api-1.3.8 spec/live/setting_spec.rb
zendesk_api-1.3.7 spec/live/setting_spec.rb
zendesk_api-1.2.10 spec/live/setting_spec.rb
zendesk_api-1.2.9 spec/live/setting_spec.rb
zendesk_api-1.2.8 spec/live/setting_spec.rb
zendesk_api-1.3.5 spec/live/setting_spec.rb
zendesk_api-1.2.7 spec/live/setting_spec.rb
zendesk_api-1.3.4 spec/live/setting_spec.rb
zendesk_api-1.3.2 spec/live/setting_spec.rb
zendesk_api-1.3.1 spec/live/setting_spec.rb
zendesk_api-1.3.0 spec/live/setting_spec.rb
zendesk_api-1.3.0.rc3 spec/live/setting_spec.rb
zendesk_api-1.2.6 spec/live/setting_spec.rb
zendesk_api-1.3.0.rc2 spec/live/setting_spec.rb
zendesk_api-1.3.0.rc1 spec/live/setting_spec.rb
zendesk_api-1.2.5 spec/live/setting_spec.rb
zendesk_api-1.2.4 spec/live/setting_spec.rb
zendesk_api-1.2.3 spec/live/setting_spec.rb
zendesk_api-1.2.2 spec/live/setting_spec.rb