Skip to content

Commit

Permalink
レビューを受けて修正
Browse files Browse the repository at this point in the history
  • Loading branch information
haruna-tsujita committed Jan 27, 2022
1 parent 35a9b02 commit c714228
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/campaigns/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ header.page-header
.page-header-actions__items
.page-header-actions__item
= link_to admin_campaigns_path, class: 'a-button is-md is-secondary is-block' do
| お試し延長編集
| お試し延長一覧

.page-tools
= render 'admin/admin_page_tabs'
Expand Down
8 changes: 4 additions & 4 deletions test/models/campaign_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class CampaignTest < ActiveSupport::TestCase
test 'recently campaign' do
later_campaign = campaigns(:campaign2)
earlier_campaign = campaigns(:campaign1)
past_campaign = campaigns(:campaign2)
current_campaign = campaigns(:campaign1)

assert_equal Campaign.recently_campaign, earlier_campaign.start_at..earlier_campaign.end_at
assert_not_equal Campaign.recently_campaign, later_campaign.start_at..later_campaign.end_at
assert_equal Campaign.recently_campaign, current_campaign.start_at..current_campaign.end_at
assert_not_equal Campaign.recently_campaign, past_campaign.start_at..past_campaign.end_at
end

test 'today is campaign?' do
Expand Down
4 changes: 2 additions & 2 deletions test/system/admin/campaigns_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class CampaignsTest < ApplicationSystemTestCase
end
assert_text 'お試し延長を更新しました。'
assert_text '春のお試し祭り'
assert_text (yesterday).strftime("%Y年%m月%d日(#{wd[yesterday.wday]}) %H:%M")
assert_text (five_days_later).strftime("%Y年%m月%d日(#{wd[five_days_later.wday]}) %H:%M")
assert_text yesterday.strftime("%Y年%m月%d日(#{wd[yesterday.wday]}) %H:%M")
assert_text five_days_later.strftime("%Y年%m月%d日(#{wd[five_days_later.wday]}) %H:%M")
end

test 'cannot create a new campaign when start_at > end_at' do
Expand Down

0 comments on commit c714228

Please sign in to comment.