Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/user_preference_spec.rb')
-rw-r--r--spec/models/user_preference_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/user_preference_spec.rb b/spec/models/user_preference_spec.rb
index 729635b5a27..401a85e2f82 100644
--- a/spec/models/user_preference_spec.rb
+++ b/spec/models/user_preference_spec.rb
@@ -238,6 +238,20 @@ RSpec.describe UserPreference, feature_category: :user_profile do
end
end
+ describe '#keyboard_shortcuts_enabled' do
+ it 'is set to true by default' do
+ pref = described_class.new
+
+ expect(pref.keyboard_shortcuts_enabled).to eq(true)
+ end
+
+ it 'returns assigned value' do
+ pref = described_class.new(keyboard_shortcuts_enabled: false)
+
+ expect(pref.keyboard_shortcuts_enabled).to eq(false)
+ end
+ end
+
describe '#render_whitespace_in_code' do
it 'is set to false by default' do
pref = described_class.new