Skip to content

Commit

Permalink
Merge pull request #7196 from fjordllc/feature/adjust_title_tag_of_in…
Browse files Browse the repository at this point in the history
…dividual_submission_page

提出物個別ページの title タグの文言の微調整。
  • Loading branch information
komagata authored Jan 16, 2024
2 parents 51d9316 + dab51ce commit a939b48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/views/products/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- title "#{@product.practice.title}の提出物"
- title "提出物: #{@product.practice.title}"
- set_meta_tags description: "#{@product.user.long_name}さんが提出した、プラクティス「#{@product.practice.title}」の提出物です。"
- category = @product.category(current_user.course)

Expand Down
14 changes: 7 additions & 7 deletions test/system/products_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@
class ProductsTest < ApplicationSystemTestCase
test 'see my product' do
visit_with_auth "/products/#{products(:product1).id}", 'mentormentaro'
assert_equal "#{products(:product1).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product1).practice.title} | FBC", title
end

test 'admin can see a product' do
visit_with_auth "/products/#{products(:product1).id}", 'komagata'
assert_equal "#{products(:product1).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product1).practice.title} | FBC", title
end

test 'adviser can see a product' do
visit_with_auth "/products/#{products(:product1).id}", 'advijirou'
assert_equal "#{products(:product1).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product1).practice.title} | FBC", title
end

test 'graduate can see a product' do
visit_with_auth "/products/#{products(:product1).id}", 'sotugyou'
assert_equal "#{products(:product1).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product1).practice.title} | FBC", title
end

test "user who completed the practice can see the other user's product" do
visit_with_auth "/products/#{products(:product1).id}", 'kimura'
assert_equal "#{products(:product1).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product1).practice.title} | FBC", title
end

test "can see other user's product if it is permitted" do
visit_with_auth "/products/#{products(:product3).id}", 'hatsuno'
assert_equal "#{products(:product3).practice.title}の提出物 | FBC", title
assert_equal "提出物: #{products(:product3).practice.title} | FBC", title
end

test "can not see other user's product if it isn't permitted" do
Expand Down Expand Up @@ -268,7 +268,7 @@ class ProductsTest < ApplicationSystemTestCase
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_equal "提出物: #{wip_product.practice.title} | FBC", title
assert_no_text "提出物はまだ提出されていません。\n完成したら「提出する」をクリック!"
end

Expand Down

0 comments on commit a939b48

Please sign in to comment.