Skip to content

Commit

Permalink
WIPアラートが提出者本人には見え、他者には見えないこと確認するテストを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
junohm410 committed Dec 7, 2023
1 parent 90c7ae1 commit 4ef54c5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/system/products_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,19 @@ class ProductsTest < ApplicationSystemTestCase
assert_text '本文を入力してください'
end

test 'user who has submitted a WIP product is alerted in the product page' do
wip_product = products(:product5)
visit_with_auth "/products/#{wip_product.id}", 'kimura'
assert_text "提出物はまだ提出されていません。\n完成したら「提出する」をクリック!"
end

test "user is not alerted in the other's WIP product page" do
wip_product = products(:product5)
visit_with_auth "/products/#{wip_product.id}", 'hatsuno'
assert_equal "#{wip_product.practice.title} | FBC", title
assert_no_text "提出物はまだ提出されていません。\n完成したら「提出する」をクリック!"
end

test "Don't notify if create product as WIP" do
visit_with_auth '/notifications', 'komagata'
click_link '全て既読にする'
Expand Down

0 comments on commit 4ef54c5

Please sign in to comment.