fix tests

This commit is contained in:
Thiago Youssef 2022-10-02 10:36:01 -03:00
parent 75df2212da
commit 61c6a45c49
2 changed files with 3 additions and 5 deletions

View file

@ -129,7 +129,7 @@
<td style="width: 100px !important; word-break: break-all;"><%= auction.registration_code %></td>
<td><%= auction.registration_deadline %></td>
<td><%= auction.platform.nil? ? 'auto' : auction.platform %></td>
<td><%= link_to(t(:delete), admin_auction_path(auction), method: :delete, data: { confirm: t(:are_you_sure_you_want_to_delete_auction) }, class: 'btn btn-danger') %></td>
<td><%= link_to(t(:delete), admin_auction_path(auction), method: :delete, data: { confirm: t(:are_you_sure_you_want_to_delete_auction) }, class: 'btn btn-danger', id: "delete-auction-#{auction.id}") %></td>
</tr>
<% end %>
</tbody>

View file

@ -173,11 +173,9 @@ class AdminAreaAuctionIntegrationTest < ApplicationSystemTestCase
def test_delete_auction
visit admin_auctions_path
domain = reserved_domains(:one)
domain = Auction.first
fill_in 'domain', with: domain.name
find(:id, 'new-auction-btn', match: :first).click
click_link_or_button 'Delete'
find(:id, "delete-auction-#{domain.id}", match: :first).click
assert_raises ActiveRecord::RecordNotFound do
domain.reload