Refactor duplication in notes controller

Clean spec