Sha256: 369b3271a8e3e0f4be2805df15d86be77b19cc0a4a919776358eeb10c3c1864e
Contents?: true
Size: 1005 Bytes
Versions: 1
Compression:
Stored size: 1005 Bytes
Contents
# frozen_string_literal: true require "rails_helper" RSpec.describe "Backend - Collection Entries (HTML)", type: :feature do describe "deletion" do before do stub_authorization! collection = create(:collection, slug: "amazing") create(:field, collection: collection, slug: "name") create(:entry, collection: collection, value: { name: "Do Not Delete" }) create(:entry, collection: collection, value: { name: "Delete Me" }) end it "returns success message when the Collection is no longer available" do visit "/backend/collections/amazing/entries" within("tbody tr:eq(1)") { click_on "Destroy" } expect(page).to have_content("Entry was successfully destroyed.") end it "does not have deleted resource" do visit "/backend/collections/amazing/entries" within("tbody tr:eq(1)") { click_on "Destroy" } within("tbody tr:eq(1)") do expect(page).not_to have_content("Delete Me") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
archangel-0.4.0 | spec/features/backend/entries/delete_spec.rb |