Sha256: 52a999907b76630755b2d0ea4e345db4ec45e6480ca8410e613235dd6ddf2254
Contents?: true
Size: 689 Bytes
Versions: 3
Compression:
Stored size: 689 Bytes
Contents
# frozen_string_literal: true require "spec_helper" RSpec.describe Decidim::FileAuthorizationHandler::Status, type: :model do let(:organization) { create :organization } it "returns last import date" do last = create :census_datum, organization: organization status = Decidim::FileAuthorizationHandler::Status.new(organization) expect(last.created_at.to_i).to eq status.last_import_at.to_i end it "retrieve the number of unique documents" do %w(AAA BBB AAA AAA).each do |doc| create(:census_datum, id_document: doc, organization:) end status = Decidim::FileAuthorizationHandler::Status.new(organization) expect(status.count).to be 2 end end
Version data entries
3 entries across 3 versions & 1 rubygems