Update tests for Peripheral#destroy

This commit is contained in:
Rick Carlino 2018-02-13 07:47:04 -06:00
parent f4c9537b98
commit 74ea34e698

View file

@ -31,18 +31,13 @@ describe Api::PeripheralsController do
before = Peripheral.count
FactoryBot.create(:sequence, device: user.device,
body: [
{
kind: "read_pin",
args: {
pin_number: {
kind: "peripheral",
args: { peripheral_id: peripheral.id }
},
label: "hey",
pin_mode: 0
}
}
])
{
kind: "read_peripheral",
args: {
peripheral_id: peripheral.id
}
}
])
delete :destroy, params: { id: peripheral.id }
expect(response.status).to eq(422)
expect(Peripheral.count).to eq(before)