Sha256: 7f33112e6dc99a0d51ef099f7ce41d5ef826ae90c98c6a99e64e6498562327d0
Contents?: true
Size: 790 Bytes
Versions: 9
Compression:
Stored size: 790 Bytes
Contents
describe Symphonia::AttachmentsController, logged: true do let!(:file) { FactoryBot.create(:file) } let(:images) { FactoryBot.create_list(:image, 3, attachable_id: nil, attachable_type: nil) } it '#show' do get symphonia.attachment_path(file) expect(response.body).to match file.attachment.url(:original) end it '#destroy' do expect{ delete(symphonia.attachment_path(file)) }.to change(Symphonia::Attachment, :count).by -1 end it '#reorder', pending: "When `identify` missing" do expect { images }.to change(Symphonia::Image, :count).by 3 patch symphonia.reorder_attachment_path images.last, 1 expect(response).to have_http_status :success imgs = Symphonia::Image.order(:position).to_a expect(imgs.first.id).to be > imgs.last.id end end
Version data entries
9 entries across 9 versions & 1 rubygems