Skip to content

Commit 155d379

Browse files
author
Takumi Kaji
authored
Merge pull request #152 from colorbox/151-fix-holiday-access-bug
Fix bug with no order record on holiday
2 parents 41a3d29 + 545200d commit 155d379

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

app/views/orders/index.html.slim

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
- if @today_order&.realized?
2-
h2
3-
| 本日 (#{l(@today_order.date)}) のお弁当を受け取る
4-
/ TODO インタフェースとしてはイケてないけどとりあえずやりたいことはこういうこと
5-
p
6-
| 本日の予約は締め切りました。受け取りチェックをするには以下のリンクをクリックしてください。
7-
= link_to l(@today_order.date), order_order_items_path(@today_order)
8-
- else
9-
h2
10-
| 本日 (#{l(@today_order.date)}) の発注は注文数不足のため注文されませんでした
1+
- if @today_order
2+
- if @today_order.realized?
3+
h2
4+
| 本日 (#{l(@today_order.date)}) のお弁当を受け取る
5+
/ TODO インタフェースとしてはイケてないけどとりあえずやりたいことはこういうこと
6+
p
7+
| 本日の予約は締め切りました。受け取りチェックをするには以下のリンクをクリックしてください。
8+
= link_to l(@today_order.date), order_order_items_path(@today_order)
9+
- else
10+
h2
11+
| 本日 (#{l(@today_order.date)}) の発注は注文数不足のため注文されませんでした
1112
h2
1213
| お弁当を予約する
1314

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'rails_helper'
2+
3+
RSpec.feature '予約できる日が存在しない時', type: :feature do
4+
scenario '予約者は注文日付選択画面が見れる' do
5+
visit orders_path
6+
7+
expect(page).to have_text('お弁当を予約する')
8+
expect(page).to have_text('予約できる日がありません')
9+
end
10+
end

0 commit comments

Comments
 (0)