Sha256: 8db3663c04539ef7b97cadd6aab374fca46668e4f0767d33865411ca42090e66
Contents?: true
Size: 907 Bytes
Versions: 11
Compression:
Stored size: 907 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim module Admin describe ExportsHelper do subject do Nokogiri::HTML(helper.export_dropdown(feature)) end let!(:feature) { create(:feature, manifest_name: "dummy") } it "creates a dropdown an export for each format and artifact" do expect(subject.css("li.exports--dummies").length).to eq(2) expect(subject.css("li.exports--format--csv").length).to eq(1) expect(subject.css("li.exports--format--json").length).to eq(1) end it "creates links for each format" do link = subject.css("li.exports--format--csv.exports--dummies a")[0] expect(link["href"]).to eq("/admin/participatory_processes/#{feature.participatory_process.id}/features/#{feature.id}/exports.csv?id=dummies") expect(link["data-method"]).to eq("post") end end end end
Version data entries
11 entries across 11 versions & 1 rubygems