Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 27 lines (21 sloc) 0.777 kb
e52f52c @holman
holman authored
1 require 'helper'
2
3 context "Office" do
4 setup do
5 end
6
7 test "url returns config office_url" do
8 Play.expects(:config).returns({'office_url' => 'http://zachholman.com'})
9 assert_equal 'http://zachholman.com', Play::Office.url
10 end
11
12 test "user string returns a string o' user data" do
13 object = "lol"
14 object.stubs(:read).returns("holman,kneath")
bc1c720 @holman Extract more methods out
holman authored
15 Play::Office.stubs(:connection).returns(object)
e52f52c @holman
holman authored
16 assert_equal "holman,kneath", Play::Office.user_string
17 end
18
19 test "users are returned based on office string" do
20 holman = Play::User.create(:office_string => 'holman')
21 kneath = Play::User.create(:office_string => 'kneath')
22
23 Play::Office.stubs(:user_string).returns("holman,defunkt")
24 assert_equal [holman], Play::Office.users
25 end
26 end
Something went wrong with that request. Please try again.