Skip to content

Commit 6c9620b

Browse files
committed
Remove outdated specs
1 parent 475e929 commit 6c9620b

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

spec/models/unlock_spec.rb

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,5 @@
4949
expect(u.id).to eq(id)
5050
expect(u.created_at).to eq(created_at)
5151
end
52-
53-
it 'deletes unlocks whose conditions changed' do
54-
Unlock.refresh_unlocks(@course, @user)
55-
@ex1.unlock_spec = ['exercise ex2'].to_json
56-
@ex1.save!
57-
@course.reload
58-
Unlock.refresh_unlocks(@course, @user)
59-
expect(Unlock.where(exercise_name: 'ex1')).to be_empty
60-
end
61-
62-
it 'updates unlocks whose unlock time changes' do
63-
Unlock.refresh_unlocks(@course, @user)
64-
65-
@ex1.unlock_spec = [(Date.today + 3.days).to_s].to_json
66-
@ex1.save!
67-
@course.reload
68-
Unlock.refresh_unlocks(@course, @user)
69-
u = Unlock.where(exercise_name: 'ex1').first
70-
expect(u.valid_after).to be > Date.today + 2.days
71-
72-
@ex1.unlock_spec = ['exercise ex2'].to_json
73-
@ex1.save!
74-
@course.reload
75-
AwardedPoint.create!(user_id: @user.id, course_id: @course.id, name: @available_point2.name)
76-
Unlock.refresh_unlocks(@course, @user)
77-
u = Unlock.where(exercise_name: 'ex1').first
78-
expect(u.valid_after).to be_nil
79-
end
8052
end
8153
end

0 commit comments

Comments
 (0)