lib/decidim/dev/test/rspec_support/feature.rb in decidim-dev-0.8.4 vs lib/decidim/dev/test/rspec_support/feature.rb in decidim-dev-0.9.0
- old
+ new
@@ -40,10 +40,11 @@
include HasCategory
include HasScope
include Decidim::Comments::Commentable
include Followable
include Traceable
+ include Publicable
feature_manifest_name "dummy"
def reported_content_url
ResourceLocatorPresenter.new(self).url
@@ -103,10 +104,18 @@
resource.name = :dummy
resource.model_class_name = "Decidim::DummyResources::DummyResource"
resource.template = "decidim/dummy_resource/linked_dummys"
end
+ feature.register_stat :dummies_count_high, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |features, _start_at, _end_at|
+ features.count * 10
+ end
+
+ feature.register_stat :dummies_count_medium, primary: true, priority: Decidim::StatsRegistry::MEDIUM_PRIORITY do |features, _start_at, _end_at|
+ features.count * 100
+ end
+
feature.exports :dummies do |exports|
exports.collection do
[1, 2, 3]
end
@@ -121,9 +130,10 @@
ActiveRecord::Migration.create_table :decidim_dummy_resources do |t|
t.string :title
t.text :address
t.float :latitude
t.float :longitude
+ t.datetime :published_at
t.references :decidim_feature, index: true
t.references :decidim_author, index: true
t.references :decidim_category, index: true
t.references :decidim_scope, index: true