Skip to content

Commit faa727c

Browse files
committed
Remove duplicated test file
While we have been working on this we have ended up with two test files that cover creating assets. Use the more comprehensive file for now and move in the only one that wasn't covered.
1 parent e4ef182 commit faa727c

2 files changed

Lines changed: 10 additions & 42 deletions

File tree

spec/features/scratch/creating_a_scratch_asset_spec.rb

Lines changed: 0 additions & 41 deletions
This file was deleted.

spec/features/scratch/creating_and_showing_a_scratch_asset_spec.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,20 @@
380380
end
381381
end
382382

383-
it 'responds 401 unauthorized when user is not part of a school' do
383+
it 'responds 401 unauthorized when user is not signed in' do
384384
post '/api/scratch/assets/example.svg', headers: { 'X-Project-ID' => project.identifier }
385385

386386
expect(response).to have_http_status(:unauthorized)
387387
end
388+
389+
it 'responds 404 Not Found when user is not part of a school' do
390+
user = create(:user)
391+
authenticated_in_hydra_as(user)
392+
393+
post '/api/scratch/assets/example.svg', headers: project_headers
394+
395+
expect(response).to have_http_status(:not_found)
396+
end
388397
end
389398

390399
def create_scratch_project(**attributes)

0 commit comments

Comments
 (0)