forked from mathieu-mbru/redmine_tiny_features
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'preprod' of https://github.com/nanego/redmine_tiny_feat…
…ures into preprod
- Loading branch information
Showing
10 changed files
with
77 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Deface::Override.new :virtual_path => 'projects/show', | ||
:name => 'hide-members-on-project-overview', | ||
:surround => "erb[loud]:contains('members_box')", | ||
:text => <<-EOS | ||
<% if !Setting["plugin_redmine_tiny_features"]["hide_members_section_on_project_overview"].present? %> | ||
<%= render_original %> | ||
<% end %> | ||
EOS |
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
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,36 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe "ProjectController", type: :system do | ||
|
||
fixtures :users, :user_preferences, :projects, :members, :roles, :member_roles | ||
|
||
before do | ||
log_user('admin', 'admin') | ||
end | ||
|
||
describe "Option to hide/show the members section on the overview page of each project" do | ||
let(:project_test) { Project.find(1) } | ||
|
||
it "hides members section when the option is activated" do | ||
|
||
Setting.send "plugin_redmine_tiny_features=", { | ||
"hide_members_section_on_project_overview" => "1", | ||
} | ||
|
||
visit "/projects/#{project_test.identifier}" | ||
expect(page).to_not have_selector('div.members') | ||
|
||
end | ||
|
||
it "displays members section when the option is deactivated" do | ||
|
||
Setting.send "plugin_redmine_tiny_features=", { | ||
"hide_members_section_on_project_overview" => "", | ||
} | ||
|
||
visit "/projects/#{project_test.identifier}" | ||
expect(page).to have_selector('div.members') | ||
end | ||
|
||
end | ||
end |
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