Commit 3f7a2346f090ab469c76c85e276c3b37238cdce9
1 parent
4389c32a
Exists in
master
and in
1 other branch
Finished pending test: finds the app if the user is watching it
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
spec/controllers/apps_controller_spec.rb
| @@ -143,7 +143,12 @@ describe AppsController do | @@ -143,7 +143,12 @@ describe AppsController do | ||
| 143 | 143 | ||
| 144 | context 'logged in as a user' do | 144 | context 'logged in as a user' do |
| 145 | it 'finds the app if the user is watching it' do | 145 | it 'finds the app if the user is watching it' do |
| 146 | - pending | 146 | + user = Factory(:user) |
| 147 | + app = Factory(:app) | ||
| 148 | + watcher = Factory(:user_watcher, :app => app, :user => user) | ||
| 149 | + sign_in user | ||
| 150 | + get :show, :id => app.id | ||
| 151 | + assigns(:app).should == app | ||
| 147 | end | 152 | end |
| 148 | 153 | ||
| 149 | it 'does not find the app if the user is not watching it' do | 154 | it 'does not find the app if the user is not watching it' do |