internetee-registry/spec/features/registrar/account_activity_spec.rb
Martin Lensment 68c335da7d Fix naming
2015-04-16 14:27:48 +03:00

30 lines
733 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 account activities 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