RSpec collection contain empty array?

后端 未结 0 672
独厮守ぢ
独厮守ぢ 2021-01-07 07:12

I have a search method in Post model:

def self.search(search, category_id)
  if search.strip.empty?
    []
  elsif category_id.empty?
    Post.approved.where(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题