Sha256: 4b938fc7cf9aa27647ee7e60658102648a4c1dd271927561e3f7547542c88475
Contents?: true
Size: 910 Bytes
Versions: 10
Compression:
Stored size: 910 Bytes
Contents
require 'test_plugin_helper' class SettingsControllerTest < ActionController::TestCase tests InsightsCloud::SettingsController test 'should return allow_auto_insights_sync setting' do Setting[:allow_auto_insights_sync] = false assert_equal false, Setting[:allow_auto_insights_sync] get :show, session: set_session_user assert_response :success actual = JSON.parse(response.body) assert_equal false, actual['insightsSyncEnabled'] end test 'should update allow_auto_insights_sync setting' do Setting[:allow_auto_insights_sync] = false assert_equal false, Setting[:allow_auto_insights_sync] patch :update, params: { insightsSyncEnabled: true }, session: set_session_user assert_response :success actual = JSON.parse(response.body) assert_equal true, actual['insightsSyncEnabled'] assert_equal true, Setting[:allow_auto_insights_sync] end end
Version data entries
10 entries across 10 versions & 1 rubygems