spec/resource_spec.rb in wordnik-0.4.7 vs spec/resource_spec.rb in wordnik-4.06.00

- old
+ new

@@ -79,11 +79,11 @@ :description => 'This is created by the test suite.', :type => 'PUBLIC', :user_id => Wordnik.configuration.user_id, :request_only => true } - @request = Wordnik.word_lists.create_word_list(body) + @request = Wordnik.word_lists.create_word_list(body, :request_only => true) @request.body.should have_key(:name) @request.body.should have_key(:description) @request.body.should have_key(:type) @request.body.should have_key(:userId) end @@ -100,61 +100,6 @@ end end - context "wordlists" do - - before do - configure_wordnik - Wordnik.authenticate - @permalink = "wordnik-ruby-test-list-#{RAND}" - end - - it "creates a wordlist" do - body = { - :name => "Wordnik Ruby Test List #{RAND}", - :description => 'This is created by the test suite.', - :type => 'PUBLIC', - :user_id => Wordnik.configuration.user_id, - :request_only => true - } - request = Wordnik.word_lists.create_word_list(body) - response = request.response - response.body.should be_a_kind_of(Hash) - response.body.should have_key('permalink') - response.body['permalink'].should == @permalink - end - - it "finds the new wordlist (method 1, using the wordList resource)" do - list = Wordnik.word_list.get_word_list_by_id(@permalink) - list.should have_key('permalink') - list['permalink'].should == @permalink - end - - it "finds the new wordlist (method 2, among user's wordlists)" do - lists = Wordnik.account.get_word_lists_for_current_user - permalinks = lists.map { |list| list['permalink'] } - permalinks.should include(@permalink) - end - - it "adds words to it" #do - # body = [ - # {:word => 'foo'}, - # {:word => 'bar'}, - # {:word => 'metasyntactic'}, - # ] - # request = Wordnik.word_list.post_words(@permalink, body) - # # raise request.response.inspect - # - # list = Wordnik.word_list.get(@permalink) - # # raise list.inspect - # end - - it "updates words" - - it "get all the words" - - it "deletes a wordlist" - - end end \ No newline at end of file