Update tests for Peripheral#destroy
This commit is contained in:
parent
f4c9537b98
commit
74ea34e698
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue