dm_preferences 1.0 → 1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/.gitignore +2 -0
- data/.travis.yml +6 -2
- data/Gemfile +22 -0
- data/README.md +3 -2
- data/app/models/preference.rb +4 -3
- data/dm_preferences.gemspec +1 -3
- data/lib/preferences.rb +11 -13
- data/lib/preferences/preference_definition.rb +17 -11
- data/lib/preferences/version.rb +1 -1
- data/spec/dummy/app/models/user.rb +6 -6
- data/spec/dummy/config/application.rb +0 -3
- data/spec/dummy/config/environments/test.rb +2 -2
- data/spec/dummy/db/schema.rb +1 -3
- data/spec/factories/car_factory.rb +5 -0
- data/spec/factories/employee_factory.rb +11 -0
- data/spec/factories/preference_factory.rb +7 -0
- data/spec/factories/users_factory.rb +5 -0
- data/spec/functional/preferences_spec.rb +287 -284
- data/spec/spec_helper.rb +13 -11
- data/spec/unit/preference_definition_spec.rb +49 -50
- data/spec/unit/preference_spec.rb +64 -64
- metadata +22 -44
- data/spec/support/factory.rb +0 -65
data/spec/spec_helper.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV["RAILS_ENV"] ||= 'test'
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'rspec/core' unless defined? RSpec.configure
|
4
|
+
require 'spec_helper'
|
5
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
6
|
require 'rspec/rails'
|
5
7
|
|
6
|
-
|
8
|
+
FactoryGirl.definition_file_paths = [File.expand_path('../factories', __FILE__)]
|
9
|
+
FactoryGirl.find_definitions
|
7
10
|
|
8
|
-
|
9
|
-
Dir[
|
11
|
+
ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
|
12
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
13
|
+
|
14
|
+
ActiveRecord::Migration.maintain_test_schema!
|
10
15
|
|
11
16
|
RSpec.configure do |config|
|
12
17
|
config.mock_with :rspec
|
13
|
-
config.use_transactional_fixtures = true
|
14
|
-
config.infer_base_class_for_anonymous_controllers = false
|
15
18
|
config.order = "random"
|
19
|
+
config.use_transactional_fixtures = true
|
20
|
+
config.infer_spec_type_from_file_location!
|
21
|
+
config.include FactoryGirl::Syntax::Methods
|
16
22
|
end
|
17
|
-
|
18
|
-
# Checks for pending migrations before tests are run.
|
19
|
-
# If you are not using ActiveRecord, you can remove this line.
|
20
|
-
ActiveRecord::Migration.maintain_test_schema!
|
@@ -7,7 +7,6 @@ describe 'PreferenceDefinitionByDefaultTest' do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'test_should_have_a_name' do
|
10
|
-
# assert_equal 'notifications2', @definition.name
|
11
10
|
expect('notifications').to eq @definition.name
|
12
11
|
end
|
13
12
|
|
@@ -16,15 +15,15 @@ describe 'PreferenceDefinitionByDefaultTest' do
|
|
16
15
|
end
|
17
16
|
|
18
17
|
it "test_should_have_a_type" do
|
19
|
-
|
18
|
+
expect(@definition.type).to eq :boolean
|
20
19
|
end
|
21
20
|
|
22
21
|
it "test_should_type_cast_values_as_booleans" do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
expect(@definition.type_cast(nil)).to eq nil
|
23
|
+
expect(@definition.type_cast(true)).to eq true
|
24
|
+
expect(@definition.type_cast(false)).to eq false
|
25
|
+
expect(@definition.type_cast(0)).to eq false
|
26
|
+
expect(@definition.type_cast(1)).to eq true
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
@@ -44,7 +43,7 @@ describe "PreferenceDefinitionWithDefaultValueTest" do
|
|
44
43
|
end
|
45
44
|
|
46
45
|
it "test_should_type_cast_default_values" do
|
47
|
-
|
46
|
+
expect(@definition.default_value).to eq true
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
@@ -55,15 +54,15 @@ describe "PreferenceDefinitionWithGroupDefaultsTest" do
|
|
55
54
|
end
|
56
55
|
|
57
56
|
it "test_should_use_default_for_default_group" do
|
58
|
-
|
57
|
+
expect(@definition.default_value).to eq true
|
59
58
|
end
|
60
59
|
|
61
60
|
it "test_should_use_default_for_unknown_group" do
|
62
|
-
|
61
|
+
expect(@definition.default_value('email')).to eq true
|
63
62
|
end
|
64
63
|
|
65
64
|
it "test_should_use_group_default_for_known_group" do
|
66
|
-
|
65
|
+
expect(@definition.default_value('chat')).to eq false
|
67
66
|
end
|
68
67
|
end
|
69
68
|
|
@@ -74,7 +73,7 @@ describe "PreferenceDefinitionWithStringifiedTypeTest" do
|
|
74
73
|
end
|
75
74
|
|
76
75
|
it "test_should_symbolize_type" do
|
77
|
-
|
76
|
+
expect(@definition.type).to eq :any
|
78
77
|
end
|
79
78
|
end
|
80
79
|
|
@@ -85,41 +84,41 @@ describe "PreferenceDefinitionWithAnyTypeTest" do
|
|
85
84
|
end
|
86
85
|
|
87
86
|
it "test_use_custom_type" do
|
88
|
-
|
87
|
+
expect(@definition.type).to eq :any
|
89
88
|
end
|
90
89
|
|
91
90
|
it "test_should_not_be_number" do
|
92
|
-
|
91
|
+
expect(!@definition.number?).to eq true
|
93
92
|
end
|
94
93
|
|
95
94
|
it "test_should_not_type_cast" do
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
expect(@definition.type_cast(nil)).to eq nil
|
96
|
+
expect(@definition.type_cast(0)).to eq 0
|
97
|
+
expect(@definition.type_cast(1)).to eq 1
|
98
|
+
expect(@definition.type_cast(false)).to eq false
|
99
|
+
expect(@definition.type_cast(true)).to eq true
|
100
|
+
expect(@definition.type_cast('')).to eq ''
|
102
101
|
end
|
103
102
|
|
104
103
|
it "test_should_query_false_if_value_is_nil" do
|
105
|
-
|
104
|
+
expect(@definition.query(nil)).to eq false
|
106
105
|
end
|
107
106
|
|
108
107
|
it "test_should_query_true_if_value_is_zero" do
|
109
|
-
|
108
|
+
expect(@definition.query(0)).to eq true
|
110
109
|
end
|
111
110
|
|
112
111
|
it "test_should_query_true_if_value_is_not_zero" do
|
113
|
-
|
114
|
-
|
112
|
+
expect(@definition.query(1)).to eq true
|
113
|
+
expect(@definition.query(-1)).to eq true
|
115
114
|
end
|
116
115
|
|
117
116
|
it "test_should_query_false_if_value_is_blank" do
|
118
|
-
|
117
|
+
expect(@definition.query('')).to eq false
|
119
118
|
end
|
120
119
|
|
121
120
|
it "test_should_query_true_if_value_is_not_blank" do
|
122
|
-
|
121
|
+
expect(@definition.query('hello')).to eq true
|
123
122
|
end
|
124
123
|
end
|
125
124
|
|
@@ -130,31 +129,31 @@ describe "PreferenceDefinitionWithBooleanTypeTest" do
|
|
130
129
|
end
|
131
130
|
|
132
131
|
it "test_should_not_be_number" do
|
133
|
-
|
132
|
+
expect(!@definition.number?).to eq true
|
134
133
|
end
|
135
134
|
|
136
135
|
it "test_should_not_type_cast_if_value_is_nil" do
|
137
|
-
|
136
|
+
expect(@definition.type_cast(nil)).to eq nil
|
138
137
|
end
|
139
138
|
|
140
139
|
it "test_should_type_cast_to_false_if_value_is_zero" do
|
141
|
-
|
140
|
+
expect(@definition.type_cast(0)).to eq false
|
142
141
|
end
|
143
142
|
|
144
143
|
it "test_should_type_cast_to_true_if_value_is_not_zero" do
|
145
|
-
|
144
|
+
expect(@definition.type_cast(1)).to eq true
|
146
145
|
end
|
147
146
|
|
148
147
|
it "test_should_type_cast_to_true_if_value_is_true_string" do
|
149
|
-
|
148
|
+
expect(@definition.type_cast('true')).to eq true
|
150
149
|
end
|
151
150
|
|
152
151
|
it "test_should_type_cast_to_nil_if_value_is_not_true_string" do
|
153
|
-
|
152
|
+
expect(@definition.type_cast('')).to eq nil
|
154
153
|
end
|
155
154
|
|
156
155
|
it "test_should_query_false_if_value_is_nil" do
|
157
|
-
|
156
|
+
expect(@definition.query(nil)).to eq false
|
158
157
|
end
|
159
158
|
|
160
159
|
it "test_should_query_true_if_value_is_one" do
|
@@ -162,15 +161,15 @@ describe "PreferenceDefinitionWithBooleanTypeTest" do
|
|
162
161
|
end
|
163
162
|
|
164
163
|
it "test_should_query_false_if_value_not_one" do
|
165
|
-
|
164
|
+
expect(@definition.query(0)).to eq false
|
166
165
|
end
|
167
166
|
|
168
167
|
it "test_should_query_true_if_value_is_true_string" do
|
169
|
-
|
168
|
+
expect(@definition.query('true')).to eq true
|
170
169
|
end
|
171
170
|
|
172
171
|
it "test_should_query_false_if_value_is_not_true_string" do
|
173
|
-
|
172
|
+
expect(@definition.query('')).to eq false
|
174
173
|
end
|
175
174
|
end
|
176
175
|
|
@@ -181,11 +180,11 @@ describe "PreferenceDefinitionWithNumericTypeTest" do
|
|
181
180
|
end
|
182
181
|
|
183
182
|
it "test_should_be_number" do
|
184
|
-
|
183
|
+
expect(@definition.number?).to eq true
|
185
184
|
end
|
186
185
|
|
187
186
|
it "test_should_type_cast_true_to_integer" do
|
188
|
-
|
187
|
+
expect(@definition.type_cast(true)).to eq 1
|
189
188
|
end
|
190
189
|
|
191
190
|
# it "test_should_type_cast_false_to_integer" do
|
@@ -193,19 +192,19 @@ describe "PreferenceDefinitionWithNumericTypeTest" do
|
|
193
192
|
# end
|
194
193
|
|
195
194
|
it "test_should_type_cast_string_to_integer" do
|
196
|
-
|
195
|
+
expect(@definition.type_cast('hello')).to eq 0
|
197
196
|
end
|
198
197
|
|
199
198
|
it "test_should_query_false_if_value_is_nil" do
|
200
|
-
|
199
|
+
expect(@definition.query(nil)).to eq false
|
201
200
|
end
|
202
201
|
|
203
202
|
it "test_should_query_true_if_value_is_one" do
|
204
|
-
|
203
|
+
expect(@definition.query(1)).to eq true
|
205
204
|
end
|
206
205
|
|
207
206
|
it "test_should_query_false_if_value_is_zero" do
|
208
|
-
|
207
|
+
expect(@definition.query(0)).to eq false
|
209
208
|
end
|
210
209
|
end
|
211
210
|
|
@@ -216,34 +215,34 @@ describe "> PreferenceDefinitionWithStringTypeTest" do
|
|
216
215
|
end
|
217
216
|
|
218
217
|
it "test_should_not_be_number" do
|
219
|
-
|
218
|
+
expect(!@definition.number?).to eq true
|
220
219
|
end
|
221
220
|
|
222
221
|
it "test_should_type_cast_integers_to_strings" do
|
223
|
-
|
222
|
+
expect(@definition.type_cast('1')).to eq '1'
|
224
223
|
end
|
225
224
|
|
226
225
|
it "test_should_not_type_cast_booleans" do
|
227
|
-
|
226
|
+
expect(@definition.type_cast(true)).to eq 't'
|
228
227
|
end
|
229
228
|
|
230
229
|
it "test_should_query_false_if_value_is_nil" do
|
231
|
-
|
230
|
+
expect(@definition.query(nil)).to eq false
|
232
231
|
end
|
233
232
|
|
234
233
|
it "test_should_query_true_if_value_is_one" do
|
235
|
-
|
234
|
+
expect(@definition.query(1)).to eq true
|
236
235
|
end
|
237
236
|
|
238
237
|
it "test_should_query_true_if_value_is_zero" do
|
239
|
-
|
238
|
+
expect(@definition.query(0)).to eq true
|
240
239
|
end
|
241
240
|
|
242
241
|
it "test_should_query_false_if_value_is_blank" do
|
243
|
-
|
242
|
+
expect(@definition.query('')).to eq false
|
244
243
|
end
|
245
244
|
|
246
245
|
it "test_should_query_true_if_value_is_not_blank" do
|
247
|
-
|
246
|
+
expect(@definition.query('hello')).to eq true
|
248
247
|
end
|
249
248
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
include Factory
|
3
|
+
# include Factory
|
4
4
|
|
5
5
|
#------------------------------------------------------------------------------
|
6
6
|
describe "PreferenceByDefaultTest" do
|
@@ -9,31 +9,31 @@ describe "PreferenceByDefaultTest" do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
it "test_should_not_have_a_name" do
|
12
|
-
|
12
|
+
expect(@preference.name.blank?).to eq true
|
13
13
|
end
|
14
14
|
|
15
15
|
it "test_should_not_have_an_owner" do
|
16
|
-
|
16
|
+
expect(@preference.owner_id).to eq nil
|
17
17
|
end
|
18
18
|
|
19
19
|
it "test_should_not_have_an_owner_type" do
|
20
|
-
|
20
|
+
expect(@preference.owner_type.blank?).to eq true
|
21
21
|
end
|
22
22
|
|
23
23
|
it "test_should_not_have_a_group_association" do
|
24
|
-
|
24
|
+
expect(@preference.group_id).to eq nil
|
25
25
|
end
|
26
26
|
|
27
27
|
it "test_should_not_have_a_group_type" do
|
28
|
-
|
28
|
+
expect(@preference.group_type.nil?).to eq true
|
29
29
|
end
|
30
30
|
|
31
31
|
it "test_should_not_have_a_value" do
|
32
|
-
|
32
|
+
expect(@preference.value.blank?).to eq true
|
33
33
|
end
|
34
34
|
|
35
35
|
it "test_should_not_have_a_definition" do
|
36
|
-
|
36
|
+
expect(@preference.definition).to eq nil
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -41,49 +41,49 @@ end
|
|
41
41
|
describe "PreferenceTest" do
|
42
42
|
|
43
43
|
it "test_should_be_valid_with_a_set_of_valid_attributes" do
|
44
|
-
preference =
|
45
|
-
|
44
|
+
preference = build(:preference)
|
45
|
+
expect(preference.valid?).to eq true
|
46
46
|
end
|
47
47
|
|
48
48
|
it "test_should_require_a_name" do
|
49
|
-
preference =
|
50
|
-
|
51
|
-
|
49
|
+
preference = build(:preference, :name => nil)
|
50
|
+
expect(preference.valid?).to eq false
|
51
|
+
expect(preference.errors.include?(:name)).to eq true
|
52
52
|
end
|
53
53
|
|
54
54
|
it "test_should_require_an_owner_id" do
|
55
|
-
preference =
|
56
|
-
|
57
|
-
|
55
|
+
preference = build(:preference, :owner => nil)
|
56
|
+
expect(preference.valid?).to eq false
|
57
|
+
expect(preference.errors.include?(:owner_id)).to eq true
|
58
58
|
end
|
59
59
|
|
60
60
|
it "test_should_require_an_owner_type" do
|
61
|
-
preference =
|
62
|
-
|
63
|
-
|
61
|
+
preference = build(:preference, :owner => nil)
|
62
|
+
expect(preference.valid?).to eq false
|
63
|
+
expect(preference.errors.include?(:owner_type)).to eq true
|
64
64
|
end
|
65
65
|
|
66
66
|
it "test_should_not_require_a_group_id" do
|
67
|
-
preference =
|
68
|
-
|
67
|
+
preference = build(:preference, :group => nil)
|
68
|
+
expect(preference.valid?).to eq true
|
69
69
|
end
|
70
70
|
|
71
71
|
it "test_should_not_require_a_group_id_if_type_specified" do
|
72
|
-
preference =
|
72
|
+
preference = build(:preference, :group => nil)
|
73
73
|
preference.group_type = 'Car'
|
74
|
-
|
74
|
+
expect(preference.valid?).to eq true
|
75
75
|
end
|
76
76
|
|
77
77
|
it "test_should_not_require_a_group_type" do
|
78
|
-
preference =
|
79
|
-
|
78
|
+
preference = build(:preference, :group => nil)
|
79
|
+
expect(preference.valid?).to eq true
|
80
80
|
end
|
81
81
|
|
82
82
|
it "test_should_require_a_group_type_if_id_specified" do
|
83
|
-
preference =
|
83
|
+
preference = build(:preference, :group => nil)
|
84
84
|
preference.group_id = 1
|
85
|
-
|
86
|
-
|
85
|
+
expect(preference.valid?).to eq false
|
86
|
+
expect(preference.errors.include?(:group_type)).to eq true
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -91,30 +91,30 @@ end
|
|
91
91
|
describe "PreferenceAsAClassTest" do
|
92
92
|
it "test_should_be_able_to_split_nil_groups" do
|
93
93
|
group_id, group_type = Preference.split_group(nil)
|
94
|
-
|
95
|
-
|
94
|
+
expect(group_id).to be_nil
|
95
|
+
expect(group_type).to be_nil
|
96
96
|
end
|
97
97
|
|
98
98
|
it "test_should_be_able_to_split_non_active_record_groups" do
|
99
99
|
group_id, group_type = Preference.split_group('car')
|
100
|
-
|
101
|
-
|
100
|
+
expect(group_id).to be_nil
|
101
|
+
expect(group_type).to eq 'car'
|
102
102
|
|
103
103
|
group_id, group_type = Preference.split_group(:car)
|
104
|
-
|
105
|
-
|
104
|
+
expect(group_id).to be_nil
|
105
|
+
expect(group_type).to eq 'car'
|
106
106
|
|
107
107
|
group_id, group_type = Preference.split_group(10)
|
108
|
-
|
109
|
-
|
108
|
+
expect(group_id).to be_nil
|
109
|
+
expect(group_type).to eq 10
|
110
110
|
end
|
111
111
|
|
112
112
|
it "test_should_be_able_to_split_active_record_groups" do
|
113
|
-
car =
|
113
|
+
car = create(:car)
|
114
114
|
|
115
115
|
group_id, group_type = Preference.split_group(car)
|
116
|
-
|
117
|
-
|
116
|
+
expect(group_id).to eq 1
|
117
|
+
expect(group_type).to eq 'Car'
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
@@ -123,7 +123,7 @@ describe "PreferenceAfterBeingCreatedTest" do
|
|
123
123
|
before do
|
124
124
|
User.preference :notifications, :boolean
|
125
125
|
|
126
|
-
@preference =
|
126
|
+
@preference = create(:preference, :name => 'notifications')
|
127
127
|
end
|
128
128
|
|
129
129
|
it "test_should_have_an_owner" do
|
@@ -139,7 +139,7 @@ describe "PreferenceAfterBeingCreatedTest" do
|
|
139
139
|
end
|
140
140
|
|
141
141
|
it "test_should_not_have_a_group_association" do
|
142
|
-
|
142
|
+
expect(@preference.group).to be_nil
|
143
143
|
end
|
144
144
|
|
145
145
|
after do
|
@@ -150,23 +150,23 @@ end
|
|
150
150
|
#------------------------------------------------------------------------------
|
151
151
|
describe "PreferenceWithBasicGroupTest" do
|
152
152
|
before do
|
153
|
-
@preference =
|
153
|
+
@preference = create(:preference, :group_type => 'car')
|
154
154
|
end
|
155
155
|
|
156
156
|
it "test_should_have_a_group_association" do
|
157
|
-
|
157
|
+
expect(@preference.group).to eq 'car'
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
161
|
#------------------------------------------------------------------------------
|
162
162
|
describe "PreferenceWithActiveRecordGroupTest" do
|
163
163
|
before do
|
164
|
-
@car =
|
165
|
-
@preference =
|
164
|
+
@car = create(:car)
|
165
|
+
@preference = create(:preference, :group => @car)
|
166
166
|
end
|
167
167
|
|
168
168
|
it "test_should_have_a_group_association" do
|
169
|
-
|
169
|
+
expect(@preference.group).to eq @car
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -177,24 +177,24 @@ describe "PreferenceWithBooleanTypeTest" do
|
|
177
177
|
end
|
178
178
|
|
179
179
|
it "test_should_type_cast_nil_values" do
|
180
|
-
preference =
|
181
|
-
|
180
|
+
preference = build(:preference, :name => 'notifications', :value => nil)
|
181
|
+
expect(preference.value).to be_nil
|
182
182
|
end
|
183
183
|
|
184
184
|
it "test_should_type_cast_numeric_values" do
|
185
|
-
preference =
|
186
|
-
|
185
|
+
preference = build(:preference, :name => 'notifications', :value => 0)
|
186
|
+
expect(preference.value).to eq false
|
187
187
|
|
188
188
|
preference.value = 1
|
189
|
-
|
189
|
+
expect(preference.value).to eq true
|
190
190
|
end
|
191
191
|
|
192
192
|
it "test_should_type_cast_boolean_values" do
|
193
|
-
preference =
|
194
|
-
|
193
|
+
preference = build(:preference, :name => 'notifications', :value => false)
|
194
|
+
expect(preference.value).to eq false
|
195
195
|
|
196
196
|
preference.value = true
|
197
|
-
|
197
|
+
expect(preference.value).to eq true
|
198
198
|
end
|
199
199
|
|
200
200
|
after do
|
@@ -209,16 +209,16 @@ describe "PreferenceWithFloatTypeTest" do
|
|
209
209
|
end
|
210
210
|
|
211
211
|
it "test_should_type_cast_nil_values" do
|
212
|
-
preference =
|
213
|
-
|
212
|
+
preference = build(:preference, :name => 'rate', :value => nil)
|
213
|
+
expect(preference.value).to be_nil
|
214
214
|
end
|
215
215
|
|
216
216
|
it "test_should_type_cast_numeric_values" do
|
217
|
-
preference =
|
218
|
-
|
217
|
+
preference = build(:preference, :name => 'rate', :value => 1.0)
|
218
|
+
expect(preference.value).to eq 1.0
|
219
219
|
|
220
220
|
preference.value = "1.1"
|
221
|
-
|
221
|
+
expect(preference.value).to eq 1.1
|
222
222
|
end
|
223
223
|
|
224
224
|
after do
|
@@ -229,16 +229,16 @@ end
|
|
229
229
|
#------------------------------------------------------------------------------
|
230
230
|
describe "PreferenceWithSTIOwnerTest" do
|
231
231
|
before do
|
232
|
-
@manager =
|
233
|
-
@preference =
|
232
|
+
@manager = create(:manager)
|
233
|
+
@preference = create(:preference, :owner => @manager, :name => 'health_insurance', :value => true)
|
234
234
|
end
|
235
235
|
|
236
236
|
it "test_should_have_an_owner" do
|
237
|
-
|
237
|
+
expect(@preference.owner).to eq @manager
|
238
238
|
end
|
239
239
|
|
240
240
|
it "test_should_have_an_owner_type" do
|
241
|
-
|
241
|
+
expect(@preference.owner_type).to eq 'Employee'
|
242
242
|
end
|
243
243
|
|
244
244
|
it "test_should_have_a_definition" do
|
@@ -246,6 +246,6 @@ describe "PreferenceWithSTIOwnerTest" do
|
|
246
246
|
end
|
247
247
|
|
248
248
|
it "test_should_have_a_value" do
|
249
|
-
|
249
|
+
expect(@preference.value).to eq true
|
250
250
|
end
|
251
251
|
end
|