Add price expiration

#522
This commit is contained in:
Artur Beljajev 2017-05-25 19:17:11 +03:00
parent 3741e2d2a3
commit 58ae53b1e6
17 changed files with 264 additions and 13 deletions

View file

@ -0,0 +1,25 @@
require 'rails_helper'
RSpec.feature 'Expiring price in admin area', settings: false do
given!(:price) { create(:unexpired_price) }
background do
sign_in_to_admin_area
end
scenario 'expires price' do
visit admin_prices_path
open_edit_form
expire
expect(page).to have_text(t('admin.billing.prices.expire.expired'))
end
def open_edit_form
find('.edit-price-btn').click
end
def expire
click_link_or_button t('admin.billing.prices.edit.expire_btn')
end
end