Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Commit 550e20e

Browse files
committed
Remove deprecated specs and moved specs from the old controller spec to the new request spec
1 parent 18e23b9 commit 550e20e

File tree

4 files changed

+9
-74
lines changed

4 files changed

+9
-74
lines changed

spec/controllers/children_controller_spec.rb

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

spec/requests/children_controller_spec.rb

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

spec/requests/children_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
sign_in(user)
1010
end
1111

12+
describe "GET #index" do
13+
context "when specifying the csv format in the request" do
14+
it "responds correct Content-Type" do
15+
get children_path, headers: { "ACCEPT" => "text/csv" }
16+
expect(response.content_type).to eq "text/csv"
17+
end
18+
end
19+
end
20+
1221
describe "POST #create" do
1322
it "should create and redirect to child_path" do
1423
post children_path, params: { family_id: family.id, child: attributes_for(:child) }

spec/routing/children_routing_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,5 @@
2929
it "routes to #update via PATCH" do
3030
expect(patch: "/children/1").to route_to("children#update", id: "1")
3131
end
32-
33-
it "routes to #destroy" do
34-
expect(delete: "/children/1").to route_to("children#destroy", id: "1")
35-
end
3632
end
3733
end

0 commit comments

Comments
 (0)