This is of course the correct answer - it depends on the context of your code. A single dogmatic approach to testing will not work equally well across all problem domains.
Simple stateless components, hitting a defined wire protocol or file format, utilizing certain API’s, testing numerical stuff, implies unit testing will go far.
Stateful components, complex multi-class flows, and heavily data driven domains will often benefit from higher level integration/end to end tests.