Skip to content

Commit

Permalink
Merge pull request #738 from momocus/pr/issue722/ikkai-hiire
Browse files Browse the repository at this point in the history
火入れの選択肢に一回火入れを追加
  • Loading branch information
momocus authored Jul 15, 2024
2 parents 628e7d8 + 73a3ca1 commit 95a6b64
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/javascript/completion/detail_dict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const hiire = [
},
{ keywords: hiyaoroshiKeywords.concat(["生詰"]), completion: "mae_hiire" },
{ keywords: ["生貯"], completion: "ato_hiire" },
{ keywords: ["一回火入れ"], completion: "ikkai_hiire" },
]

const warimizu = [{ keywords: ["原酒"], completion: "genshu" }]
Expand Down
2 changes: 2 additions & 0 deletions app/models/sake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Sake < ApplicationRecord
mae_hiire: 2,
ato_hiire: 3,
nido_hiire: 4,
ikkai_hiire: 5,
}, _prefix: true
enum tokutei_meisho: {
none: 0,
Expand Down Expand Up @@ -196,4 +197,5 @@ def selling_price
(price.to_f / size * 180 * SELLING_RATE).ceil(-2)
end
end

# rubocop:enable Metrics/ClassLength
1 change: 1 addition & 0 deletions config/locales/enums/sake.ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ja:
mae_hiire: 前火入れ
ato_hiire: 後火入れ
nido_hiire: 二度火入れ
ikkai_hiire: 一回火入れ(前後不明)
tokutei_meisho:
none: なし
honjozo: 本醸造
Expand Down
6 changes: 6 additions & 0 deletions spec/system/sake_form_completion_for_detail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@
selected = I18n.t("enums.sake.hiire.ato_hiire")
expect(page).to have_select("sake_hiire", selected:)
end

it "is completed 一回火入れ" do
fill_in("sake_name", with: "生道井 一回火入れ").send_keys(:tab)
selected = I18n.t("enums.sake.hiire.ikkai_hiire")
expect(page).to have_select("sake_hiire", selected:)
end
end

describe "warimizu" do
Expand Down

0 comments on commit 95a6b64

Please sign in to comment.