mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 13:51:41 +02:00
parent
8916eee169
commit
f76e1259fc
11 changed files with 106 additions and 65 deletions
|
@ -1,7 +1,7 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Editing price in admin area', settings: false do
|
||||
given!(:price) { create(:unexpired_price) }
|
||||
given!(:price) { create(:effective_price) }
|
||||
|
||||
background do
|
||||
sign_in_to_admin_area
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Expiring price in admin area', settings: false do
|
||||
given!(:price) { create(:unexpired_price) }
|
||||
given!(:price) { create(:effective_price) }
|
||||
|
||||
background do
|
||||
sign_in_to_admin_area
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Viewing prices in admin area', settings: false do
|
||||
given!(:unexpired_price) { create(:unexpired_price) }
|
||||
given!(:effective_price) { create(:effective_price) }
|
||||
given!(:expired_price) { create(:expired_price) }
|
||||
|
||||
background do
|
||||
|
@ -9,17 +9,17 @@ RSpec.feature 'Viewing prices in admin area', settings: false do
|
|||
end
|
||||
|
||||
describe 'search' do
|
||||
context 'when validity is not selected' do
|
||||
scenario 'shows unexpired prices' do
|
||||
context 'when status is not selected' do
|
||||
scenario 'shows effective prices' do
|
||||
visit admin_prices_path
|
||||
expect(page).to have_css('.price', count: 1)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when validity is given' do
|
||||
scenario 'filters by given validity' do
|
||||
context 'when status is given' do
|
||||
scenario 'filters by given status' do
|
||||
visit admin_prices_path
|
||||
select 'unexpired', from: 'search_validity'
|
||||
select 'effective', from: 'search_status'
|
||||
submit_search_form
|
||||
|
||||
expect(page).to have_css('.price', count: 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue