Skip to content

Instantly share code, notes, and snippets.

@dreamr
Created June 19, 2013 19:56
Show Gist options
  • Save dreamr/5817492 to your computer and use it in GitHub Desktop.
Save dreamr/5817492 to your computer and use it in GitHub Desktop.
describe "with nested collateral" do
let(:parent) { create :collateral, attachment: hotplay }
before do
HotplayViewer.create(user: user, hotplay: hotplay)
get :index, format: :json
end
it { assert_response :success }
it { response.headers["Content-Type"].must_include "application/json" }
it { json["user"]["id"].must_equal user.id }
it { json["hotplays"].first[:collaterals].must_equal [] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment