Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Quirino authored and benreyn committed Sep 20, 2019
1 parent ac085eb commit 337f646
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/requests/families_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@

describe "GET #index" do
it "return http sucess" do
get families_path
get families_path

expect(response).to have_http_status(:ok)
end
end

describe "GET #new" do
it "should return status code 200" do
it "should return status code 200" do
get new_family_path

expect(response).to have_http_status :ok
end
end

describe "POST #create" do
it "should create and redirect to family_path" do
describe "POST #create" do
it "should create and redirect to family_path" do
post families_path, params: { family: attributes_for(:family) }

family = Family.select(:id).last

expect(response).to redirect_to(family_path(family.id))
expect(request.flash[:notice]).to eql "Family was successfully created."
expect(request.flash[:notice]).to eql "Family was successfully created."
end
end

describe "PUT #update" do
let(:family) { create(:family, partner: partner) }
let(:family) { create(:family, partner: partner) }

it "should update and redirect to family_path" do
put family_path(family), params: { family: attributes_for(:family) }

expect(response).to redirect_to(family_path(family.id))
expect(request.flash[:notice]).to eql "Family was successfully updated."
expect(request.flash[:notice]).to eql "Family was successfully updated."
end
end

Expand All @@ -53,7 +53,7 @@
delete family_path(family)

expect(response).to redirect_to(families_path)
expect(request.flash[:notice]).to eql "Family was successfully destroyed."
expect(request.flash[:notice]).to eql "Family was successfully destroyed."
end
end
end

0 comments on commit 337f646

Please sign in to comment.