lk | redirects to bike edit page when bike updated successfully

This commit is contained in:
Louis Knapp
2016-07-30 20:24:05 -05:00
parent 0ee1168f6a
commit b7090dba0d
3 changed files with 9 additions and 1 deletions
@@ -55,4 +55,11 @@ describe BikesController do
expect(assigns(:next_bike)).to eq(@next_bike)
end
end
describe "#update" do
it "redirects to edit bike path when bike is updated" do
bike = create :bike
expect( put :update, id: bike.id, bike: {brand: "foobar"} ).to redirect_to action: :edit, id: assigns(:bike).id
end
end
end