File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
- describe OrganizationsController do
4
- describe '#show' do
5
- let ( :organization ) { Fabricate ( :organization ) }
3
+ RSpec . describe OrganizationsController do
4
+ let ( :organization ) { Fabricate ( :organization ) }
5
+ let ( :member ) { Fabricate ( :member , organization : organization ) }
6
+ let ( :user ) { member . user }
6
7
8
+ describe '#show' do
7
9
it 'links to new_transfer_path' do
8
10
get 'show' , id : organization . id
9
11
expect ( response . body ) . to include (
10
12
"<a href=\" /transfers/new?destination_account_id=#{ organization . account . id } &id=#{ organization . id } \" >"
11
13
)
12
14
end
13
15
end
16
+
17
+ describe '#set_current' do
18
+ before { login ( user ) }
19
+
20
+ it 'stores the given organization as current organization in session' do
21
+ post 'set_current' , id : organization . id
22
+ end
23
+ end
14
24
end
You can’t perform that action at this time.
0 commit comments