forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add tests for event and update test for command
- Loading branch information
1 parent
d6eb4d5
commit 0096e95
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
decidim-proposals/spec/events/decidim/proposals/author_confirmation_proposal_event_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
require "spec_helper" | ||
|
||
module Decidim | ||
module Proposals | ||
describe AuthorConfirmationProposalEvent do | ||
let(:resource) { create(:proposal) } | ||
let(:participatory_process) { create(:participatory_process, organization:) } | ||
let(:proposal_component) { create(:proposal_component, participatory_space: participatory_process) } | ||
let(:event_name) { "decidim.events.proposals.author_confirmation_proposal_event" } | ||
|
||
include_context "when a simple event" | ||
|
||
it_behaves_like "a simple event" | ||
|
||
describe "resource_title" do | ||
it "returns the proposal title" do | ||
expect(subject.resource_title).to eq(decidim_sanitize_translated(resource.title)) | ||
end | ||
end | ||
end | ||
end | ||
end |