diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml index 55ee3e1594..9e790542a8 100644 --- a/spec/.rubocop.yml +++ b/spec/.rubocop.yml @@ -4,806 +4,564 @@ plugins: - rubocop-rspec - rubocop-rspec_rails + +#### BASE SECTION AllCops: TargetRubyVersion: 3.2 -Bundler/DuplicatedGem: - Enabled: true - -FactoryBot/AssociationStyle: - Enabled: true - -FactoryBot/ConsistentParenthesesStyle: - Enabled: true - -FactoryBot/ExcessiveCreateList: - Enabled: true - -FactoryBot/FactoryNameStyle: - Enabled: true - -FactoryBot/FactoryAssociationWithStrategy: - Enabled: true - -FactoryBot/IdSequence: - Enabled: true - -FactoryBot/RedundantFactoryOption: - Enabled: true - -FactoryBot/SyntaxMethods: - Enabled: true - -Layout/EmptyLinesAfterModuleInclusion: - Enabled: true - -Layout/ParameterAlignment: - Enabled: true - -Layout/ClosingParenthesisIndentation: - Enabled: true +#### CUSTOMIZED SECTION Layout/DotPosition: EnforcedStyle: trailing - Layout/FirstArrayElementIndentation: EnforcedStyle: consistent - -Layout/FirstHashElementIndentation: - Enabled: true - -Layout/MultilineArrayBraceLayout: - Enabled: true - -Layout/MultilineBlockLayout: - Enabled: true - -Layout/MultilineHashBraceLayout: - Enabled: true - -Layout/MultilineMethodCallBraceLayout: - Enabled: true - -Layout/MultilineMethodDefinitionBraceLayout: - Enabled: true - -Layout/MultilineOperationIndentation: - Enabled: true - +Layout/LineLength: + Max: 180 Layout/SpaceAroundEqualsInParameterDefault: EnforcedStyle: no_space - -Lint/AmbiguousBlockAssociation: - Enabled: true - -Lint/AmbiguousRegexpLiteral: - Enabled: true - -Lint/DuplicateMatchPattern: - Enabled: true - -Lint/ItWithoutArgumentsInBlock: - Enabled: true - -Lint/LiteralAssignmentInCondition: - Enabled: true - -Lint/MixedCaseRange: - Enabled: true - -Lint/RedundantRegexpQuantifiers: - Enabled: true - -Lint/SuppressedException: - Enabled: true - -Lint/ScriptPermission: - Enabled: true - -Lint/UnifiedInteger: - Enabled: true - -Lint/UnusedBlockArgument: - Enabled: true - -Lint/UnusedMethodArgument: - Enabled: true - -Lint/UriEscapeUnescape: - Enabled: true - -Metrics/AbcSize: - Enabled: true - -Metrics/ClassLength: - Enabled: true - Metrics/CyclomaticComplexity: Max: 12 - -Layout/LineLength: - Max: 180 - Metrics/MethodLength: Max: 60 - -Metrics/ModuleLength: - Enabled: false - -Metrics/ParameterLists: - Enabled: true - -Metrics/PerceivedComplexity: - Enabled: true - -Naming/FileName: - Enabled: true - -Naming/HeredocDelimiterNaming: - Enabled: true - -Naming/PredicateMethod: - Enabled: true - -Naming/PredicatePrefix: - Enabled: true - -Naming/VariableNumber: - Enabled: true - Style/Alias: EnforcedStyle: prefer_alias_method - -Style/ArrayIntersectWithSingleElement: - Enabled: true - -Style/BlockDelimiters: - Enabled: true - -Style/ClassAndModuleChildren: - Enabled: true - -Style/CollectionQuerying: - Enabled: true - -Style/ComparableBetween: - Enabled: true - Style/Documentation: AllowedConstants: ['Test'] - -Style/DoubleNegation: - Enabled: true - -Style/EachWithObject: - Enabled: true - -Style/EmptyStringInsideInterpolation: - Enabled: true - -Style/Encoding: - Enabled: true - Style/FormatString: EnforcedStyle: sprintf +Style/RaiseArgs: + EnforcedStyle: compact -Style/FrozenStringLiteralComment: - Enabled: true - -Style/GuardClause: - Enabled: true - -Style/HashFetchChain: - Enabled: true - -Style/HashSlice: - Enabled: true - -Style/ItAssignment: - Enabled: true - -Style/ItBlockParameter: - Enabled: true - -Style/IfUnlessModifier: - Enabled: true - -Style/KeywordArgumentsMerging: - Enabled: true - -Style/Lambda: - Enabled: true - -Style/MapIntoArray: - Enabled: true - -Style/MultilineBlockChain: - Enabled: true - -Style/NegatedIf: - Enabled: true - -Style/Next: - Enabled: true -Style/NumericLiteralPrefix: - Enabled: true - -Style/NumericLiterals: - Enabled: true - -Style/NumericPredicate: +#### ENABLED SECTION +Bundler/DuplicatedGem: Enabled: true - -Style/PercentLiteralDelimiters: +Capybara/ClickLinkOrButtonStyle: Enabled: true - -Style/RaiseArgs: - EnforcedStyle: compact - -Style/RedundantArrayFlatten: +Capybara/FindAllFirst: Enabled: true - -Style/RedundantFormat: +Capybara/MatchStyle: Enabled: true - -Style/RedundantSelf: +Capybara/NegationMatcher: Enabled: true - -Style/RescueModifier: +Capybara/NegationMatcherAfterVisit: Enabled: true - -Style/SafeNavigation: +Capybara/RedundantWithinFind: Enabled: true - -Style/SendWithLiteralMethodName: +Capybara/RSpec/HaveSelector: Enabled: true - -Style/SignalException: +Capybara/RSpec/PredicateMatcher: Enabled: true - -Style/SingleLineBlockParams: +Capybara/SpecificActions: Enabled: true - -Style/StructInheritance: +Capybara/SpecificFinders: Enabled: true - -Style/SuperArguments: +Capybara/SpecificMatcher: Enabled: true - -Style/SymbolArray: +FactoryBot/AssociationStyle: Enabled: true - -Style/TernaryParentheses: +FactoryBot/ConsistentParenthesesStyle: Enabled: true - -Style/TrailingCommaInArguments: +FactoryBot/ExcessiveCreateList: Enabled: true - -Style/TrailingUnderscoreVariable: +FactoryBot/FactoryAssociationWithStrategy: Enabled: true - -Style/TrivialAccessors: +FactoryBot/FactoryNameStyle: Enabled: true - -Style/WordArray: +FactoryBot/IdSequence: Enabled: true - -Style/ZeroLengthPredicate: +FactoryBot/RedundantFactoryOption: Enabled: true - -Metrics/BlockLength: +FactoryBot/SyntaxMethods: + Enabled: true +Gemspec/AddRuntimeDependency: Enabled: true - Gemspec/AttributeAssignment: Enabled: true - Gemspec/DeprecatedAttributeAssignment: Enabled: true - Gemspec/DevelopmentDependencies: Enabled: true - Gemspec/RequireMFA: Enabled: true - +Layout/ClosingParenthesisIndentation: + Enabled: true +Layout/EmptyLinesAfterModuleInclusion: + Enabled: true +Layout/FirstHashElementIndentation: + Enabled: true Layout/LineContinuationLeadingSpace: Enabled: true - Layout/LineContinuationSpacing: Enabled: true - Layout/LineEndStringConcatenationIndentation: Enabled: true - +Layout/MultilineArrayBraceLayout: + Enabled: true +Layout/MultilineBlockLayout: + Enabled: true +Layout/MultilineHashBraceLayout: + Enabled: true +Layout/MultilineMethodCallBraceLayout: + Enabled: true +Layout/MultilineMethodDefinitionBraceLayout: + Enabled: true +Layout/MultilineOperationIndentation: + Enabled: true +Layout/ParameterAlignment: + Enabled: true Layout/SpaceBeforeBrackets: Enabled: true - Lint/AmbiguousAssignment: Enabled: true - -Lint/ArrayLiteralInRegexp: +Lint/AmbiguousBlockAssociation: Enabled: true - Lint/AmbiguousOperatorPrecedence: Enabled: true - Lint/AmbiguousRange: Enabled: true - +Lint/AmbiguousRegexpLiteral: + Enabled: true +Lint/ArrayLiteralInRegexp: + Enabled: true Lint/ConstantOverwrittenInRescue: Enabled: true - Lint/ConstantReassignment: Enabled: true - Lint/CopDirectiveSyntax: Enabled: true - Lint/DeprecatedConstants: Enabled: true - Lint/DuplicateBranch: Enabled: true - Lint/DuplicateMagicComment: Enabled: true - +Lint/DuplicateMatchPattern: + Enabled: true Lint/DuplicateRegexpCharacterClassElement: Enabled: true - Lint/DuplicateSetElement: Enabled: true - Lint/EmptyBlock: Enabled: true - Lint/EmptyClass: Enabled: true - Lint/EmptyInPattern: Enabled: true - Lint/HashNewWithKeywordArgumentsAsDefault: Enabled: true - Lint/IncompatibleIoSelectWithFiberScheduler: Enabled: true - +Lint/ItWithoutArgumentsInBlock: + Enabled: true Lint/LambdaWithoutLiteralBlock: Enabled: true - +Lint/LiteralAssignmentInCondition: + Enabled: true +Lint/MixedCaseRange: + Enabled: true Lint/NoReturnInBeginEndBlocks: Enabled: true - Lint/NonAtomicFileOperation: Enabled: true - Lint/NumberedParameterAssignment: Enabled: true - Lint/NumericOperationWithConstantResult: Enabled: true - Lint/OrAssignmentToConstant: Enabled: true - Lint/RedundantDirGlobSort: Enabled: true - +Lint/RedundantRegexpQuantifiers: + Enabled: true Lint/RedundantTypeConversion: Enabled: true - Lint/RefinementImportMethods: Enabled: true - Lint/RequireRangeParentheses: Enabled: true - Lint/RequireRelativeSelfPath: Enabled: true - +Lint/ScriptPermission: + Enabled: true Lint/SharedMutableDefault: Enabled: true - +Lint/SuppressedException: + Enabled: true Lint/SuppressedExceptionInNumberConversion: Enabled: true - Lint/SymbolConversion: Enabled: true - Lint/ToEnumArguments: Enabled: true - Lint/TripleQuotes: Enabled: true - Lint/UnescapedBracketInRegexp: Enabled: true - Lint/UnexpectedBlockArity: Enabled: true - +Lint/UnifiedInteger: + Enabled: true Lint/UnmodifiedReduceAccumulator: Enabled: true - +Lint/UnusedBlockArgument: + Enabled: true +Lint/UnusedMethodArgument: + Enabled: true +Lint/UriEscapeUnescape: + Enabled: true Lint/UselessConstantScoping: Enabled: true - Lint/UselessDefaultValueArgument: Enabled: true - Lint/UselessDefined: Enabled: true - Lint/UselessNumericOperation: Enabled: true - Lint/UselessOr: Enabled: true - Lint/UselessRescue: Enabled: true - Lint/UselessRuby2Keywords: Enabled: true - +Metrics/AbcSize: + Enabled: true +Metrics/BlockLength: + Enabled: true +Metrics/ClassLength: + Enabled: true Metrics/CollectionLiteralLength: Enabled: true - +Metrics/ParameterLists: + Enabled: true +Metrics/PerceivedComplexity: + Enabled: true Naming/BlockForwarding: Enabled: true - +Naming/FileName: + Enabled: true +Naming/HeredocDelimiterNaming: + Enabled: true +Naming/PredicateMethod: + Enabled: true +Naming/PredicatePrefix: + Enabled: true +Naming/VariableNumber: + Enabled: true +RSpec/BeEmpty: + Enabled: true +RSpec/BeEq: + Enabled: true +RSpec/BeNil: + Enabled: true +RSpec/ChangeByZero: + Enabled: true +RSpec/ContainExactly: + Enabled: true +RSpec/DuplicatedMetadata: + Enabled: true +RSpec/EmptyMetadata: + Enabled: true +RSpec/EmptyOutput: + Enabled: true +RSpec/Eq: + Enabled: true +RSpec/ExcessiveDocstringSpacing: + Enabled: true +RSpec/ExpectInLet: + Enabled: true +RSpec/IdenticalEqualityAssertion: + Enabled: true +RSpec/IncludeExamples: + Enabled: true +RSpec/IndexedLet: + Enabled: true +RSpec/IsExpectedSpecify: + Enabled: true +RSpec/LeakyLocalVariable: + Enabled: true +RSpec/MatchArray: + Enabled: true +RSpec/MetadataStyle: + Enabled: true +RSpec/NoExpectationExample: + Enabled: true +RSpec/Output: + Enabled: true +RSpec/PendingWithoutReason: + Enabled: true +RSpec/ReceiveMessages: + Enabled: true +RSpec/RedundantAround: + Enabled: true +RSpec/RedundantPredicateMatcher: + Enabled: true +RSpec/RemoveConst: + Enabled: true +RSpec/RepeatedSubjectCall: + Enabled: true +RSpec/SkipBlockInsideExample: + Enabled: true +RSpec/SortMetadata: + Enabled: true +RSpec/SpecFilePathFormat: + Enabled: true +RSpec/SpecFilePathSuffix: + Enabled: true +RSpec/SubjectDeclaration: + Enabled: true +RSpec/UndescriptiveLiteralsDescription: + Enabled: true +RSpec/VerifiedDoubleReference: + Enabled: true +RSpecRails/AvoidSetupHook: + Enabled: true +RSpecRails/HaveHttpStatus: + Enabled: true +RSpecRails/HttpStatusNameConsistency: + Enabled: true +RSpecRails/InferredSpecType: + Enabled: true +RSpecRails/MinitestAssertions: + Enabled: true +RSpecRails/NegationBeValid: + Enabled: true +RSpecRails/TravelAround: + Enabled: true Security/CompoundHash: Enabled: true - Security/IoMethods: Enabled: true - Style/AmbiguousEndlessMethodDefinition: Enabled: true - Style/ArgumentsForwarding: Enabled: true - Style/ArrayIntersect: Enabled: true - +Style/ArrayIntersectWithSingleElement: + Enabled: true Style/BitwisePredicate: Enabled: true - -Style/CombinableDefined: +Style/BlockDelimiters: + Enabled: true +Style/ClassAndModuleChildren: Enabled: true - Style/CollectionCompact: Enabled: true - +Style/CollectionQuerying: + Enabled: true +Style/CombinableDefined: + Enabled: true +Style/ComparableBetween: + Enabled: true Style/ComparableClamp: Enabled: true - Style/ConcatArrayLiterals: Enabled: true - Style/DataInheritance: Enabled: true - Style/DigChain: Enabled: true - Style/DirEmpty: Enabled: true - Style/DocumentDynamicEvalDefinition: Enabled: true - +Style/DoubleNegation: + Enabled: true +Style/EachWithObject: + Enabled: true +Style/EmptyClassDefinition: + Enabled: true Style/EmptyHeredoc: Enabled: true - +Style/EmptyStringInsideInterpolation: + Enabled: true +Style/Encoding: + Enabled: true Style/EndlessMethod: Enabled: true - Style/EnvHome: Enabled: true - Style/ExactRegexpMatch: Enabled: true - +Style/FetchEnvVar: + Enabled: true Style/FileEmpty: Enabled: true - Style/FileNull: Enabled: true - -Style/FileTouch: - Enabled: true - -Style/FetchEnvVar: - Enabled: true - Style/FileRead: Enabled: true - +Style/FileTouch: + Enabled: true Style/FileWrite: Enabled: true - +Style/FrozenStringLiteralComment: + Enabled: true +Style/GuardClause: + Enabled: true Style/HashConversion: Enabled: true - Style/HashExcept: Enabled: true - +Style/HashFetchChain: + Enabled: true +Style/HashSlice: + Enabled: true +Style/IfUnlessModifier: + Enabled: true Style/IfWithBooleanLiteralBranches: Enabled: true - Style/InPatternThen: Enabled: true - +Style/ItAssignment: + Enabled: true +Style/ItBlockParameter: + Enabled: true +Style/KeywordArgumentsMerging: + Enabled: true +Style/Lambda: + Enabled: true Style/MagicCommentFormat: Enabled: true - Style/MapCompactWithConditionalBlock: Enabled: true - +Style/MapIntoArray: + Enabled: true Style/MapToHash: Enabled: true - Style/MapToSet: Enabled: true - Style/MinMaxComparison: Enabled: true - +Style/ModuleMemberExistenceCheck: + Enabled: true +Style/MultilineBlockChain: + Enabled: true Style/MultilineInPatternThen: Enabled: true - +Style/NegatedIf: + Enabled: true Style/NegatedIfElseCondition: Enabled: true - +Style/NegativeArrayIndex: + Enabled: true Style/NestedFileDirname: Enabled: true - +Style/Next: + Enabled: true Style/NilLambda: Enabled: true - Style/NumberedParameters: Enabled: true - Style/NumberedParametersLimit: Enabled: true - +Style/NumericLiteralPrefix: + Enabled: true +Style/NumericLiterals: + Enabled: true +Style/NumericPredicate: + Enabled: true Style/ObjectThen: Enabled: true - Style/OpenStructUse: Enabled: true - Style/OperatorMethodCall: Enabled: true - +Style/PercentLiteralDelimiters: + Enabled: true Style/QuotedSymbols: Enabled: true - Style/RedundantArgument: Enabled: true - Style/RedundantArrayConstructor: Enabled: true - +Style/RedundantArrayFlatten: + Enabled: true Style/RedundantConstantBase: Enabled: true - Style/RedundantCurrentDirectoryInPath: Enabled: true - Style/RedundantDoubleSplatHashBraces: Enabled: true - Style/RedundantEach: Enabled: true - Style/RedundantFilterChain: Enabled: true - +Style/RedundantFormat: + Enabled: true Style/RedundantHeredocDelimiterQuotes: Enabled: true - Style/RedundantInitialize: Enabled: true - Style/RedundantInterpolationUnfreeze: Enabled: true - Style/RedundantLineContinuation: Enabled: true - Style/RedundantRegexpArgument: Enabled: true - Style/RedundantRegexpConstructor: Enabled: true - +Style/RedundantSelf: + Enabled: true Style/RedundantSelfAssignmentBranch: Enabled: true - Style/RedundantStringEscape: Enabled: true - -Style/ReturnNilInPredicateMethodDefinition: - Enabled: true - -Style/SafeNavigationChainLength: - Enabled: true - -Style/SelectByRegexp: - Enabled: true - -Style/SingleLineDoEndBlock: - Enabled: true - -Style/StringChars: - Enabled: true - -Style/SuperWithArgsParentheses: - Enabled: true - -Style/SwapValues: - Enabled: true - -Style/YAMLFileRead: - Enabled: true - -Capybara/ClickLinkOrButtonStyle: - Enabled: true - -Capybara/FindAllFirst: - Enabled: true - -Capybara/MatchStyle: - Enabled: true - -Capybara/NegationMatcher: - Enabled: true - -Capybara/NegationMatcherAfterVisit: - Enabled: true - -Capybara/RedundantWithinFind: - Enabled: true - -Capybara/RSpec/HaveSelector: - Enabled: true - -Capybara/RSpec/PredicateMatcher: - Enabled: true - -Capybara/SpecificActions: - Enabled: true - -Capybara/SpecificFinders: - Enabled: true - -Capybara/SpecificMatcher: - Enabled: true - -RSpec/BeEmpty: - Enabled: true - -RSpec/BeEq: - Enabled: true - -RSpec/BeNil: - Enabled: true - -RSpec/ChangeByZero: - Enabled: true - -RSpec/ContainExactly: - Enabled: true - -RSpec/DuplicatedMetadata: - Enabled: true - -RSpec/EmptyMetadata: - Enabled: true - -RSpec/EmptyOutput: - Enabled: true - -RSpec/Eq: - Enabled: true - -RSpec/ExcessiveDocstringSpacing: - Enabled: true - -RSpec/ExpectInLet: - Enabled: true - -RSpec/IdenticalEqualityAssertion: - Enabled: true - -RSpec/IncludeExamples: - Enabled: true - -RSpec/IndexedLet: +Style/RescueModifier: Enabled: true - -RSpec/IsExpectedSpecify: +Style/ReturnNilInPredicateMethodDefinition: Enabled: true - -RSpec/MatchArray: +Style/ReverseFind: Enabled: true - -RSpec/MetadataStyle: +Style/SafeNavigation: Enabled: true - -RSpec/NoExpectationExample: +Style/SafeNavigationChainLength: Enabled: true - -RSpec/PendingWithoutReason: +Style/SelectByRegexp: Enabled: true - -RSpec/ReceiveMessages: +Style/SendWithLiteralMethodName: Enabled: true - -RSpec/RedundantAround: +Style/SignalException: Enabled: true - -RSpec/RedundantPredicateMatcher: +Style/SingleLineBlockParams: Enabled: true - -RSpec/RemoveConst: +Style/SingleLineDoEndBlock: Enabled: true - -RSpec/RepeatedSubjectCall: +Style/StringChars: Enabled: true - -RSpec/SkipBlockInsideExample: +Style/StructInheritance: Enabled: true - -RSpec/SortMetadata: +Style/SuperArguments: Enabled: true - -RSpec/SpecFilePathFormat: +Style/SuperWithArgsParentheses: Enabled: true - -RSpec/SpecFilePathSuffix: +Style/SwapValues: Enabled: true - -RSpec/SubjectDeclaration: +Style/SymbolArray: Enabled: true - -RSpec/UndescriptiveLiteralsDescription: +Style/TernaryParentheses: Enabled: true - -RSpec/VerifiedDoubleReference: +Style/TrailingCommaInArguments: Enabled: true - -RSpecRails/AvoidSetupHook: +Style/TrailingUnderscoreVariable: Enabled: true - -RSpecRails/HaveHttpStatus: +Style/TrivialAccessors: Enabled: true - -RSpecRails/InferredSpecType: +Style/WordArray: Enabled: true - -RSpecRails/MinitestAssertions: +Style/YAMLFileRead: Enabled: true - -RSpecRails/NegationBeValid: +Style/ZeroLengthPredicate: Enabled: true -RSpecRails/TravelAround: - Enabled: true -RSpec/MultipleMemoizedHelpers: +#### DISABLED SECTION +Metrics/ModuleLength: + Enabled: false +RSpec/ExampleLength: Enabled: false - RSpec/MultipleExpectations: Enabled: false - -RSpec/ExampleLength: +RSpec/MultipleMemoizedHelpers: Enabled: false - -Gemspec/AddRuntimeDependency: - Enabled: true diff --git a/spec/blobstore/backup_spec.rb b/spec/blobstore/backup_spec.rb index 59d135f4a6..808475fe87 100644 --- a/spec/blobstore/backup_spec.rb +++ b/spec/blobstore/backup_spec.rb @@ -16,21 +16,23 @@ def template job.template('bin/bbr/backup') end - links = [ - Link.new(name: 'directories_to_backup', properties: { - 'cc' => { - 'droplets' => { - 'droplet_directory_key' => 'some_droplets_directory_key' - }, - 'buildpacks' => { - 'buildpack_directory_key' => 'some_buildpacks_directory_key' - }, - 'packages' => { - 'app_package_directory_key' => 'some_packages_directory_key' + let(:links) do + [ + Link.new(name: 'directories_to_backup', properties: { + 'cc' => { + 'droplets' => { + 'droplet_directory_key' => 'some_droplets_directory_key' + }, + 'buildpacks' => { + 'buildpack_directory_key' => 'some_buildpacks_directory_key' + }, + 'packages' => { + 'app_package_directory_key' => 'some_packages_directory_key' + } } - } - }) - ] + }) + ] + end it 'templates all the backup commands' do expect(template.render({}, consumes: links)).to( diff --git a/spec/blobstore/restore_spec.rb b/spec/blobstore/restore_spec.rb index 0e8193f1b4..18ad21db7e 100644 --- a/spec/blobstore/restore_spec.rb +++ b/spec/blobstore/restore_spec.rb @@ -16,21 +16,23 @@ def template job.template('bin/bbr/restore') end - links = [ - Link.new(name: 'directories_to_backup', properties: { - 'cc' => { - 'droplets' => { - 'droplet_directory_key' => 'some_droplets_directory_key' - }, - 'buildpacks' => { - 'buildpack_directory_key' => 'some_buildpacks_directory_key' - }, - 'packages' => { - 'app_package_directory_key' => 'some_packages_directory_key' + let(:links) do + [ + Link.new(name: 'directories_to_backup', properties: { + 'cc' => { + 'droplets' => { + 'droplet_directory_key' => 'some_droplets_directory_key' + }, + 'buildpacks' => { + 'buildpack_directory_key' => 'some_buildpacks_directory_key' + }, + 'packages' => { + 'app_package_directory_key' => 'some_packages_directory_key' + } } - } - }) - ] + }) + ] + end it 'templates all the restore commands' do expect(template.render({}, consumes: links)).to(