mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Fix invoice tests
This commit is contained in:
parent
10891d1638
commit
e987e201ad
6 changed files with 33 additions and 2 deletions
28
spec/features/admin/invoice_spec.rb
Normal file
28
spec/features/admin/invoice_spec.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
require 'rails_helper'
|
||||
|
||||
feature 'Invoice', type: :feature do
|
||||
background { create_settings }
|
||||
|
||||
before :all do
|
||||
@user = Fabricate(:admin_user, username: 'user1', identity_code: '37810013087')
|
||||
Fabricate(:invoice)
|
||||
end
|
||||
|
||||
it 'should show index of invoices' do
|
||||
sign_in @user
|
||||
visit admin_invoices_url
|
||||
i = Invoice.first
|
||||
page.should have_link("Invoice no. #{i.id}")
|
||||
end
|
||||
|
||||
it 'should show invoice' do
|
||||
sign_in @user
|
||||
visit admin_invoices_url
|
||||
i = Invoice.first
|
||||
|
||||
click_link("Invoice no. #{i.id}")
|
||||
page.should have_content("Seller")
|
||||
page.should have_content("Details")
|
||||
page.should have_content("Paldiski mnt. 123")
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue