Sha256: 1050dc5dfe4742c0756dce5d0561325145551f44b48e189a9e67cf31a15d1cdb
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 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 "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 "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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-0.1.0 | decidim-proposals/spec/shared/export_proposals_examples.rb |