-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6593943
commit 63a6320
Showing
7 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
app/controllers/notice/admin/member_annunciates_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Notice::Admin::MemberAnnunciatesController < Notice::Admin::BaseController | ||
|
||
end |
3 changes: 3 additions & 0 deletions
3
app/views/notice/admin/member_annunciates/_base/_index_tbody.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<td><%= model.state %></td> | ||
<td><%= model.annunciated_at %></td> | ||
<td><%= model.notifications_count %></td> |
3 changes: 3 additions & 0 deletions
3
app/views/notice/admin/member_annunciates/_base/_index_thead.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<th><%= MemberAnnunciate.human_attribute_name(:state) %></th> | ||
<th><%= MemberAnnunciate.human_attribute_name(:annunciated_at) %></th> | ||
<th><%= MemberAnnunciate.human_attribute_name(:notifications_count) %></th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<%= f.text_field :state %> | ||
<%= f.text_field :annunciated_at %> | ||
<%= f.text_field :notifications_count %> |
12 changes: 12 additions & 0 deletions
12
app/views/notice/admin/member_annunciates/_show_table.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<tr> | ||
<td class="has-text-right"><%= MemberAnnunciate.human_attribute_name(:state) %></td> | ||
<td><%= @member_annunciate.state %></td> | ||
</tr> | ||
<tr> | ||
<td class="has-text-right"><%= MemberAnnunciate.human_attribute_name(:annunciated_at) %></td> | ||
<td><%= @member_annunciate.annunciated_at %></td> | ||
</tr> | ||
<tr> | ||
<td class="has-text-right"><%= MemberAnnunciate.human_attribute_name(:notifications_count) %></td> | ||
<td><%= @member_annunciate.notifications_count %></td> | ||
</tr> |
62 changes: 62 additions & 0 deletions
62
test/controllers/notice/admin/member_annunciates_controller_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
require 'test_helper' | ||
class Notice::Admin::MemberAnnunciatesControllerTest < ActionDispatch::IntegrationTest | ||
|
||
setup do | ||
@member_annunciate = member_annunciates(:one) | ||
end | ||
|
||
test 'index ok' do | ||
get url_for(controller: 'notice/admin/member_annunciates') | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'new ok' do | ||
get url_for(controller: 'notice/admin/member_annunciates') | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'create ok' do | ||
assert_difference('MemberAnnunciate.count') do | ||
post( | ||
url_for(controller: 'notice/admin/member_annunciates', action: 'create'), | ||
params: { member_annunciate: { annunciated_at: @notice_admin_member_annunciate.annunciated_at, notifications_count: @notice_admin_member_annunciate.notifications_count, state: @notice_admin_member_annunciate.state } }, | ||
as: :turbo_stream | ||
) | ||
end | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'show ok' do | ||
get url_for(controller: 'notice/admin/member_annunciates', action: 'show', id: @member_annunciate.id) | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'edit ok' do | ||
get url_for(controller: 'notice/admin/member_annunciates', action: 'edit', id: @member_annunciate.id) | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'update ok' do | ||
patch( | ||
url_for(controller: 'notice/admin/member_annunciates', action: 'update', id: @member_annunciate.id), | ||
params: { member_annunciate: { annunciated_at: @notice_admin_member_annunciate.annunciated_at, notifications_count: @notice_admin_member_annunciate.notifications_count, state: @notice_admin_member_annunciate.state } }, | ||
as: :turbo_stream | ||
) | ||
|
||
assert_response :success | ||
end | ||
|
||
test 'destroy ok' do | ||
assert_difference('MemberAnnunciate.count', -1) do | ||
delete url_for(controller: 'notice/admin/member_annunciates', action: 'destroy', id: @member_annunciate.id), as: :turbo_stream | ||
end | ||
|
||
assert_response :success | ||
end | ||
|
||
end |