File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 234
234
235
235
describe "#calculate_credits" do
236
236
it "should use initial credit value" do
237
- activity = create ( :activity , credit : 50 , duration_in_hours : 2.5 )
237
+ activity = create ( :activity , :with_duration , credit : 50 )
238
238
expect ( activity . credit ) . to eq ( 50 )
239
239
end
240
240
241
241
it "calculates the correct credits from duration in hours" do
242
- activity = create ( :activity , :activity_no_credits , duration_in_hours : 2.5 )
242
+ activity = create ( :activity , :with_duration , :activity_no_credits )
243
243
expect ( activity . credit ) . to eq ( 25 )
244
244
end
245
245
246
246
it "should not change credit amount if no duration in hours" do
247
- activity = create ( :activity , credit : 50 , duration_in_hours : nil )
247
+ activity = create ( :activity , credit : 50 )
248
248
expect ( activity . credit ) . to eq ( 50 )
249
249
end
250
250
You can’t perform that action at this time.
0 commit comments