test/client_test.rb in tracker_api-0.2.1 vs test/client_test.rb in tracker_api-0.2.2
- old
+ new
@@ -59,9 +59,27 @@
project.account_id.wont_be_nil
end
end
end
+ describe '.me' do
+ let(:pt_user) { PT_USER_1 }
+ let(:client) { TrackerApi::Client.new token: pt_user[:token] }
+ let(:username) { pt_user[:username] }
+ let(:project_id) { pt_user[:project_id] }
+
+ it 'gets info about the authenticated user' do
+ VCR.use_cassette('get me', record: :new_episodes) do
+ me = client.me
+
+ me.must_be_instance_of TrackerApi::Resources::Me
+ me.username.must_equal username
+
+ me.projects.map(&:project_id).must_include project_id
+ end
+ end
+ end
+
describe '.paginate' do
let(:pt_user) { PT_USER_1 }
let(:client) { TrackerApi::Client.new token: pt_user[:token] }
let(:project_id) { pt_user[:project_id] }