spec/resource_spec.rb in survey-gizmo-ruby-2.0.1 vs spec/resource_spec.rb in survey-gizmo-ruby-3.0.3
- old
+ new
@@ -1,20 +1,16 @@
require 'spec_helper'
-describe 'Survey Gizmo Resource' do
+describe 'Survey Gizmo Resource' do
let(:create_attributes_to_compare) { }
let(:get_attributes_to_compare) { }
describe SurveyGizmo::Resource do
- before(:each) do
- SurveyGizmo.setup(user: 'test@test.com', password: 'password')
- end
-
let(:described_class) { SurveyGizmoSpec::ResourceTest }
- let(:create_attributes) { {title: 'Spec', test_id: 5} }
- let(:update_attributes) { {title: 'Updated'} }
- let(:first_params) { {id: 1, test_id: 5} }
+ let(:create_attributes) { { title: 'Spec', test_id: 5 } }
+ let(:update_attributes) { { title: 'Updated' } }
+ let(:first_params) { { id: 1, test_id: 5 } }
let(:get_attributes) { create_attributes.merge(id: 1) }
let(:uri_paths){
{
get: '/test/1',
create: '/test/5/resource',
@@ -40,11 +36,11 @@
it_should_behave_like 'an API object'
it_should_behave_like 'an object with errors'
context '#convert_filters_into_query_string' do
let(:page) { 2 }
- let(:filters) { {page: page, filters: [{field: 'istestdata', operator: '<>', value: 1}] }}
+ let(:filters) { { page: page, filters: [{ field: 'istestdata', operator: '<>', value: 1 }] } }
it 'should generate the correct page request' do
expect(SurveyGizmoSpec::ResourceTest.convert_filters_into_query_string(page: page)).to eq("?page=#{page}")
end
@@ -168,6 +164,21 @@
it_should_behave_like 'an API object'
it_should_behave_like 'an object with errors'
end
+ describe SurveyGizmo::API::AccountTeams do
+ pending('Need an account with admin privileges to test this')
+ let(:create_attributes) { { teamid: 1234, teamname: 'team' } }
+ let(:get_attributes) { create_attributes.merge(id: 1234) }
+ let(:update_attributes) { create_attributes }
+ let(:first_params) { { teamname: 'team' } }
+ let(:uri_paths) do
+ h = { :create => '/account_teams/1234' }
+ h.default = '/account_teams/1234'
+ h
+ end
+
+ #it_should_behave_like 'an API object'
+ #it_should_behave_like 'an object with errors'
+ end
end