internetee-registry/spec/features/registrar/account_activity_spec.rb
2015-04-16 14:26:48 +03:00

30 lines
732 B
Ruby

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