-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't clear embargo dates while adding user to admin participants lis…
…t. (#6163) * Don't clear embargo dates while adding user to admin participants list. * Add unique test for method #permission_template_update_params.
- Loading branch information
Showing
3 changed files
with
37 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
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
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 |
---|---|---|
|
@@ -598,5 +598,22 @@ def count_workflow_roles_for(user) | |
).permit! | ||
end | ||
end | ||
|
||
context "update params for workflow role with no :release_varies and :release_embargo keys" do | ||
let(:user_bob) { FactoryBot.create(:user, email: "[email protected]") } | ||
let(:input_params) do | ||
ActionController::Parameters.new(agent_type: "user", | ||
agent_id: user_bob.user_key, | ||
access: "view").permit! | ||
end | ||
|
||
it "should not change" do | ||
expect(subject).to eq ActionController::Parameters.new( | ||
agent_type: "user", | ||
agent_id: user_bob.user_key, | ||
access: "view" | ||
).permit! | ||
end | ||
end | ||
end | ||
end |