Skip to content

Commit

Permalink
Refractor banaan to meeting (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
lodewiges authored Jan 19, 2025
1 parent ea5ca59 commit cbc8e0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/study_room_presence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class StudyRoomPresence < ApplicationRecord
validates :start_time, presence: true
validates :end_time, presence: true
validates_datetime :end_time, after: :start_time
validates :status, inclusion: { in: %w[chilling studying banaan] }
validates :status, inclusion: { in: %w[chilling studying vergaderen] }

scope :current, (lambda {
where('start_time <= :current_time AND end_time >= :current_time',
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/study_room_presences.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
factory :study_room_presence do
start_time { Faker::Time.between(from: 3.days.ago, to: 5.days.ago) }
end_time { Faker::Time.between(from: 10.days.from_now, to: 5.days.from_now) }
status { %w[chilling studying banaan].sample }
status { %w[chilling studying vergaderen].sample }
user

trait(:future) { start_time { Faker::Time.between(from: 1.day.from_now, to: 4.days.from_now) } }
Expand Down

0 comments on commit cbc8e0a

Please sign in to comment.