mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
BUGFIX: fix broken spec
This commit is contained in:
parent
177983afe6
commit
74c1555885
2 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,10 @@ module Middleware
|
|||
@env = env
|
||||
end
|
||||
|
||||
def is_mobile=(val)
|
||||
@is_mobile = val ? :true : :false
|
||||
end
|
||||
|
||||
def is_mobile?
|
||||
@is_mobile ||=
|
||||
begin
|
||||
|
|
|
@ -35,6 +35,7 @@ describe Middleware::AnonymousCache::Helper do
|
|||
end
|
||||
|
||||
it "returns cached data for cached requests" do
|
||||
helper.is_mobile = true
|
||||
helper.cached.should be_nil
|
||||
helper.cache([200, {"HELLO" => "WORLD"}, ["hello ", "world"]])
|
||||
helper.cached.should == [200, {"HELLO" => "WORLD"}, ["hello world"]]
|
||||
|
|
Loading…
Reference in a new issue