Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In peaches/:id, add ability to delete peach #4

Open
kkchu791 opened this issue Jan 5, 2016 · 2 comments
Open

In peaches/:id, add ability to delete peach #4

kkchu791 opened this issue Jan 5, 2016 · 2 comments

Comments

@kkchu791
Copy link

kkchu791 commented Jan 5, 2016

It should delete the peach.

@kkchu791
Copy link
Author

kkchu791 commented Jan 5, 2016

  describe 'destroy' do
    let!(:haiku) { FactoryGirl.create(:haiku, {"lines_attributes": {"0": {"content": "haiku line"}}} ) }
    it "should delete the haiku" do
      expect{ delete "/haikus/#{haiku.id}", format: :json }.to change{Haiku.count}.by(-1)
    end
  end

@kkchu791 kkchu791 added the ready label Jan 5, 2016
@jendiamond jendiamond changed the title Write test for PeachesController#destroy Add peaches_controller#destroy Jan 7, 2016
@kkchu791 kkchu791 changed the title Add peaches_controller#destroy In peaches/:id/edit, add ability to delete peach Jan 8, 2016
@kkchu791 kkchu791 changed the title In peaches/:id/edit, add ability to delete peach In peaches/:id, add ability to delete peach Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant