Need Model Unit Testing

8 views
Skip to first unread message

Mohankumar k.o

unread,
Jul 3, 2017, 11:05:50 PM7/3/17
to BANGALORE RUG-Ruby Users Group
Hi all
I need Model side unit testing for the code below,
Please help me to get it done.


def terminal_access
unless terminal_access_key.present?
$redis.set("#{self.user_name}_terminal_access_cache_key",
{result: (mlodge_terminals + ltv_terminals + tv2g_terminals).flatten.as_json(only: [:app_cd, :gw_tid])}.to_json)
end
JSON(terminal_access_key)['result']
end
Reply all
Reply to author
Forward
0 new messages