Sha256: df371cc4f6eb064574075196e84066e7a79f7dd2f2c5cafd9c3441f1ac34fd2e
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
require 'spec_helper' describe Gensee::Client::Training do ## NOTICE: Below tests need a read Gensee account, ## please set then var ENV, for example: ## export GENSEE_ENDPOINT='http://yoursubdomain.gensee.com' GENSEE_LOGIN='loginname' GENSEE_PASSWORD='somelooogpassword' let(:client) { Gensee.client } let(:classroom) { client.create_classroom("[TEST] a funny topic #{rand(100)}", Time.now, rand(100_000..200_000).to_s, rand(100_000..200_000).to_s) } context 'classroom' do after(:each) do expect(client.delete_classroom(classroom[:id])[:code]).to eq '0' end it 'create' do expect(classroom).to be_kind_of Hash expect(classroom[:code]).to eq '0' end it 'modify and delete' do new_subject = '[Test] NEW classroom subject' t = Time.now + 600 * 60 room = client.modify_classroom(classroom[:id], new_subject, t, classroom[:teacher_token], classroom[:assistant_token]) expect(room[:code]).to eq '0' end it 'query and delete' do info = client.classroom_info(classroom[:id]) expect(info[:id]).to eq info[:id] end end context 'classware' do it 'should list all' do list = client.courseware_list classroom[:id] expect(list[:code]).to eq '0' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gensee-0.1.2 | spec/gensee/client/training_spec.rb |
gensee-0.1.1 | spec/gensee/client/training_spec.rb |
gensee-0.1.0 | spec/gensee/client/training_spec.rb |