3072: add an empty collection in db seeds
authorTim Pierce <twp@curoverse.com>
Mon, 14 Jul 2014 18:01:28 +0000 (14:01 -0400)
committerTim Pierce <twp@curoverse.com>
Tue, 15 Jul 2014 19:29:48 +0000 (15:29 -0400)
commita96adab2a4758c7a969156621c0ed4fe710b98c2
tree05e389cd29c502cd834ae261d3d929d853150479
parent76c61ffb15b51c00a174a6f73a96ab84df69f0f6
3072: add an empty collection in db seeds

Added empty collection (owned by the anonymous group) to test fixtures
and to db/seeds.rb.

API integration tests: in permissions_test.rb, test that the active user
can read objects in the anonymous group, even when there are no explicit
permission links on that group or objects in it.

Workbench integration tests: added a test to confirm that a non-admin
user can get the empty collection.

Cleanup code: User.can? now takes either a uuid or an object for the target.

Refs #3072.
apps/workbench/test/integration/collections_test.rb
services/api/app/models/user.rb
services/api/db/migrate/20140714184006_empty_collection.rb [new file with mode: 0644]
services/api/db/seeds.rb
services/api/db/structure.sql
services/api/lib/current_api_client.rb
services/api/test/fixtures/collections.yml
services/api/test/integration/permissions_test.rb