Don't leave any data behind after testing
This commit is contained in:
@@ -103,6 +103,10 @@ describe "App with Riak backend" do
|
||||
put "/jimmy/documents/bar", "another text"
|
||||
end
|
||||
|
||||
after do
|
||||
data_bucket.delete("jimmy:documents:bar")
|
||||
end
|
||||
|
||||
it "saves the value" do
|
||||
last_response.status.must_equal 200
|
||||
data_bucket.get("jimmy:documents:bar").data.must_equal "another text"
|
||||
@@ -124,6 +128,10 @@ describe "App with Riak backend" do
|
||||
put "/jimmy/documents/jason", '{"foo": "bar", "unhosted": 1}'
|
||||
end
|
||||
|
||||
after do
|
||||
data_bucket.delete("jimmy:documents:jason")
|
||||
end
|
||||
|
||||
it "saves the value (as JSON)" do
|
||||
last_response.status.must_equal 200
|
||||
data_bucket.get("jimmy:documents:jason").data.must_be_kind_of Hash
|
||||
@@ -192,6 +200,10 @@ describe "App with Riak backend" do
|
||||
header "Authorization", "Bearer 321"
|
||||
end
|
||||
|
||||
after do
|
||||
storage_client.bucket("authorizations").delete("jimmy:123")
|
||||
end
|
||||
|
||||
describe "GET" do
|
||||
it "returns a 403" do
|
||||
get "/jimmy/documents/foo"
|
||||
|
||||
Reference in New Issue
Block a user