Skip to content

Commit

Permalink
Cleaned up delete shared example considerably. It should be much easi…
Browse files Browse the repository at this point in the history
…er to read now.

Tests pass for bookmarks controller. other controllers will need more work to properly ensure they do as expected (e.g. send back archive header).

Also seperately created a shared example for archive behaviour. It is incomplete and not put into any controller yet.

modified:   app/serializers/audio_recording_serializer.rb
	-- fixed up eroneous association definition for site

modified:   db/migrate/20121025045908_add_user_stamp_to_projects.rb
modified:   db/migrate/20121025050112_add_user_stamp_to_sites.rb
modified:   db/migrate/20121031055154_create_tags.rb
modified:   db/schema.rb
	-- amended migrations to properly reflect our diagram that we scribbled on (what should and should not have archive)

modified:   spec/controllers/analysis_items_controller_spec.rb
modified:   spec/controllers/analysis_jobs_controller_spec.rb
modified:   spec/controllers/analysis_scripts_controller_spec.rb
modified:   spec/controllers/audio_events_controller_spec.rb
modified:   spec/controllers/audio_recordings_controller_spec.rb
modified:   spec/controllers/bookmarks_controller_spec.rb
modified:   spec/controllers/permissions_controller_spec.rb
modified:   spec/controllers/photos_controller_spec.rb
modified:   spec/controllers/progresses_controller_spec.rb
modified:   spec/controllers/projects_controller_spec.rb
modified:   spec/controllers/saved_searches_controller_spec.rb
modified:   spec/controllers/sites_controller_spec.rb
modified:   spec/controllers/tags_controller_spec.rb
modified:   spec/controllers/users_controller_spec.rb
	-- updated the DELETE section with new updated shared example

modified:   spec/factories/bookmark_factory.rb
modified:   spec/factories/user_factory.rb
	-- added some sequences to ensure always unique fields (sometimes the Faker library was producing doubles
		... we should find it very concerning we are generating that much test data!)

new file:   spec/support/api_examples_archive_behaviour.rb
	-- abstracted archive behaviour tests to a seperate file. not complete.

modified:   spec/support/api_examples_delete.rb
	-- refactored / rewrote. all the tests are the same, they are just laid out in an order that makes more sense.
		merged valid and invalid tests together - it made more sense because of the truth table (see top of file)

modified:   spec/support/helpers.rb
	-- got rid off the json_empty_body method, unecessary, replaced with an if in the normal  json method

deleted:    spec/support/shared_api_examples.rb
	-- emtpy, no longer used
  • Loading branch information
atruskie committed Jan 28, 2013
1 parent c298574 commit 6187967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/audio_recording_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AudioRecordingSerializer < CommonAttributesSerializer
:recorded_date, :sample_rate_hertz, :status, :uploader_id,
:uuid

has_many :sites, :serializer => AudioRecordingInSiteSerializer
has_one :site, :serializer => AudioRecordingInSiteSerializer
end


0 comments on commit 6187967

Please sign in to comment.