Files
timeoverflow/spec/controllers/statistics_controller_spec.rb

20 lines
567 B
Ruby

require 'spec_helper'
RSpec.describe StatisticsController do
let(:organization) { Fabricate(:organization) }
let(:member) { Fabricate(:member, organization: organization) }
before(:each) { login(member.user) }
describe '#statistics_all_transfers' do
it 'populates all transfers from current organization' do
transfer = Fabricate(:transfer, source: organization.account, destination: member.account)
transfer2 = Fabricate(:transfer)
get :statistics_all_transfers
expect(assigns(:transfers)).to eq([transfer])
end
end
end