This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin sees right status when there are no bids
This covers the show page for admin auctions
- Loading branch information
Kane Baccigalupi
committed
Nov 22, 2016
1 parent
fa73ba3
commit cd2d161
Showing
6 changed files
with
58 additions
and
16 deletions.
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
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,19 @@ | ||
class AdminAuctionStatusPresenter::NoBids < AdminAuctionStatusPresenter::Base | ||
def header | ||
I18n.t('statuses.admin_auction_status_presenter.no_bids.header') | ||
end | ||
|
||
def body | ||
I18n.t( | ||
'statuses.admin_auction_status_presenter.no_bids.body', | ||
end_date: end_date | ||
) | ||
end | ||
|
||
private | ||
|
||
def end_date | ||
DcTimePresenter.convert_and_format(auction.ended_at) | ||
end | ||
end | ||
|
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
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
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
Then(/^I should see that approval has not been requested for the auction$/) do | ||
I18n.t('statuses.c2_presenter.not_requested.body', link: '') | ||
end | ||
|
||
Then(/^I should see the message that the auction is closed without bids$/) do | ||
expect(page).to have_content(I18n.t('bidding_status.over.no_bids')) | ||
|
||
expect(page).to have_content( | ||
I18n.t('statuses.admin_auction_status_presenter.no_bids.body', end_date: end_date) | ||
) | ||
end |
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