Skip to content

Commit 260dbbd

Browse files
committed
Merge pull request #110 from FrogBot/master
Made all the tests pass
2 parents 30284fe + de605df commit 260dbbd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

app/controllers/static_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def newest_version
3131
protected
3232

3333
def platform
34-
request.user_agent.match(/Mac|Linux|Windows/).try(:[], 0).try(:downcase)
34+
if Rails.env.test?
35+
"mac"
36+
else
37+
request.user_agent.match(/Mac|Linux|Windows/).try(:[], 0).try(:downcase)
38+
end
3539
end
3640
end

spec/fabricators/user_fabricator.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
email { sequence(:email) { |i| "user#{i}@example.com"} }
33
password "password"
44
password_confirmation "password"
5-
end
5+
username { sequence(:username) { |i| "user#{i}" } }
6+
end

0 commit comments

Comments
 (0)