Sha256: 85058a87862d745c4dd20aadbf64baf69b0dfffa913748ce280a452cef9aab0a
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
# -*- coding: utf-8 -*- # frozen_string_literal: true RSpec.shared_examples "export proposals" do let!(:proposals) { create_list :proposal, 3, feature: current_feature } around do |example| perform_enqueued_jobs do example.run end end it "exports a CSV" do find(".exports.dropdown").click click_link "Proposals as CSV" within ".callout.success" do expect(page).to have_content("in progress") end expect(last_email.subject).to include("proposals", "csv") expect(last_email.attachments.length).to be_positive expect(last_email.attachments.first.filename).to match(/^proposals.*\.zip$/) end it "exports a JSON" do find(".exports.dropdown").click click_link "Proposals as JSON" within ".callout.success" do expect(page).to have_content("in progress") end expect(last_email.subject).to include("proposals", "json") expect(last_email.attachments.length).to be_positive expect(last_email.attachments.first.filename).to match(/^proposals.*\.zip$/) end end
Version data entries
9 entries across 9 versions & 1 rubygems