spec/osm/model_spec.rb in osm-0.1.2 vs spec/osm/model_spec.rb in osm-0.1.3

- old
+ new

@@ -39,11 +39,11 @@ it "Configure (allows empty Hash)" do Osm::Model.configure({}) config = ModelTester.test_get_config config[:cache].should be_nil - config[:ttl].should == 1800 + config[:ttl].should == 600 config[:prepend_to_key].should == 'OSMAPI' end it "Configure (bad arguments)" do expect{ Osm::Model.configure(@CONFIGURATION[:cache].merge(:prepend_to_key => :invalid)) }.to raise_error(ArgumentError, ':prepend_to_key must be a String') @@ -61,11 +61,11 @@ OsmTest::Cache.should_receive('exist?').with('OSMAPI-osm-key') { true } ModelTester.cache('exist?', @api, 'key').should be_true end it "Writes" do - OsmTest::Cache.should_receive('write').with('OSMAPI-osm-key', 'data', {:expires_in=>1800}) { true } + OsmTest::Cache.should_receive('write').with('OSMAPI-osm-key', 'data', {:expires_in=>600}) { true } ModelTester.cache('write', @api, 'key', 'data').should be_true end it "Reads" do OsmTest::Cache.should_receive('read').with('OSMAPI-osm-key') { 'data' } @@ -121,20 +121,20 @@ describe "Set User Permissions" do it "All Sections" do permissions = {1 => {:a => [:read, :write]}, 2 => {:a => [:read]}} - OsmTest::Cache.should_receive('write').with('OSMAPI-osm-permissions-user_id', permissions, {:expires_in=>1800}) { true } + OsmTest::Cache.should_receive('write').with('OSMAPI-osm-permissions-user_id', permissions, {:expires_in=>600}) { true } ModelTester.set_user_permissions(@api, permissions) end it "Single section" do permissions = {1 => {:a => [:read, :write]}, 2 => {:a => [:read]}} OsmTest::Cache.should_receive('exist?').with('OSMAPI-osm-permissions-user_id') { true } OsmTest::Cache.should_receive('read').with('OSMAPI-osm-permissions-user_id') { permissions } - OsmTest::Cache.should_receive('write').with('OSMAPI-osm-permissions-user_id', permissions.merge(3 => {:a => [:read]}), {:expires_in=>1800}) { true } + OsmTest::Cache.should_receive('write').with('OSMAPI-osm-permissions-user_id', permissions.merge(3 => {:a => [:read]}), {:expires_in=>600}) { true } ModelTester.set_user_permissions(@api, 3, {:a => [:read]}) end end -end \ No newline at end of file +end