Sha256: 8e90fd7bc5d4514a170ae6c7b2c4fa1b4ae7647d6c49f5516faa323222e6f0bb
Contents?: true
Size: 1.42 KB
Versions: 8
Compression:
Stored size: 1.42 KB
Contents
require 'spec_helper' describe Voog::API::Site do let(:client) { voog_client } describe '#site' do before do request_fixture(:get, 'site', fixture: 'site/site') end it 'returns a single site' do expect(client.site.search_enabled).to eq(false) end it 'returns a site with the same meta_keywords as in the request' do expect(client.site.meta_keywords).to eq('my key words') end end describe '#update_site' do before do request_fixture(:put, 'site', request: {body: {meta_keywords: 'new keys'}}, response: {body: '{"meta_keywords": "new keys"}'}) end it 'responds with updated meta_keywords' do expect(client.update_site(meta_keywords: 'new keys').meta_keywords).to eq('new keys') end end describe '#patch_site' do before do request_fixture(:patch, 'site', request: {body: {meta_keywords: 'new keys'}}, response: {body: '{"meta_keywords": "new keys"}'}) end it 'responds with updated meta_keywords' do expect(client.patch_site(meta_keywords: 'new keys').meta_keywords).to eq('new keys') end end describe '#update_site_data' do before do request_fixture(:put, 'site/data/my_key', request: {body: {value: 'New key'}}, response: {body: '{"data": {"my_key": "New key"}}'}) end it 'responds updated data' do expect(client.update_site_data('my_key', 'New key').data.my_key).to eq('New key') end end end
Version data entries
8 entries across 8 versions & 1 rubygems