:trackers => Tracker.where(:name => 'Feature request')
)
- Role.non_member.add_permission! :edit_issues
- Role.non_member.remove_permission! :add_issues, :add_issue_notes
+ Role.non_member.add_permission! :edit_issues, :add_issues
+ Role.non_member.remove_permission! :add_issue_notes
log_user('someone', 'foo')
visit '/issues/1'
def setup
Redmine::SudoMode.stubs(:enabled?).returns(true)
+ super
+ end
+
+ def teardown
+ travel_back
+ super
end
def test_add_user
log_user('admin', 'admin')
+ expire_sudo_mode!
+
visit '/users/new'
assert_difference 'User.count' do
end
end
end
+
+ private
+
+ # sudo mode is active after sign, let it expire by advancing the time
+ def expire_sudo_mode!
+ travel_to 20.minutes.from_now
+ end
end