Skip to content

Commit

Permalink
イベント一覧に定期イベント作成リンクを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
sadanora committed Nov 9, 2022
1 parent 06e0d75 commit f5ac74b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/events/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ header.page-header
= link_to new_event_path, class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| イベント作成
.page-header-actions__item
= link_to new_regular_event_path, class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| 定期イベント作成

= render 'events/tabs'

Expand Down
5 changes: 5 additions & 0 deletions test/system/events_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class EventsTest < ApplicationSystemTestCase
assert_link 'イベント作成'
end

test 'show link to create new regular event' do
visit_with_auth events_path, 'komagata'
assert_link '定期イベント作成'
end

test 'users except admin cannot publish a event' do
visit_with_auth new_event_path, 'kimura'
page.assert_no_selector("input[value='作成']")
Expand Down

0 comments on commit f5ac74b

Please sign in to comment.