mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Feature tests for account activities
This commit is contained in:
parent
e4dc1d466f
commit
c4b0d6aee5
7 changed files with 45 additions and 4 deletions
30
spec/features/registrar/account_activity_spec.rb
Normal file
30
spec/features/registrar/account_activity_spec.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
require 'rails_helper'
|
||||
|
||||
feature 'Account activity', type: :feature do
|
||||
before :all do
|
||||
@user = Fabricate(:api_user)
|
||||
end
|
||||
|
||||
context 'as unknown user' do
|
||||
it 'should redirect to sign in page' do
|
||||
visit '/registrar/account_activities'
|
||||
current_path.should == '/registrar/login'
|
||||
page.should have_text('You need to sign in or sign up')
|
||||
end
|
||||
end
|
||||
|
||||
context 'as signed in user' do
|
||||
before do
|
||||
registrar_sign_in
|
||||
end
|
||||
|
||||
it 'should navigate to the domains index page' do
|
||||
current_path.should == '/registrar'
|
||||
click_link 'Billing'
|
||||
click_link 'Account activity'
|
||||
|
||||
current_path.should == '/registrar/account_activities'
|
||||
page.should have_text('+110.0 EUR')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue