spec/adapters/oracle_spec.rb in sequel-3.31.0 vs spec/adapters/oracle_spec.rb in sequel-3.32.0
- old
+ new
@@ -29,9 +29,27 @@
ORACLE_DB.pool.size.should == 1
ORACLE_DB.disconnect
ORACLE_DB.pool.size.should == 0
end
+ specify "should have working view_exists?" do
+ begin
+ ORACLE_DB.view_exists?(:cats).should be_false
+ ORACLE_DB.create_view(:cats, ORACLE_DB[:categories])
+ ORACLE_DB.view_exists?(:cats).should be_true
+ om = ORACLE_DB.identifier_output_method
+ im = ORACLE_DB.identifier_input_method
+ ORACLE_DB.identifier_output_method = :reverse
+ ORACLE_DB.identifier_input_method = :reverse
+ ORACLE_DB.view_exists?(:STAC).should be_true
+ ORACLE_DB.view_exists?(:cats).should be_false
+ ensure
+ ORACLE_DB.identifier_output_method = om
+ ORACLE_DB.identifier_input_method = im
+ ORACLE_DB.drop_view(:cats)
+ end
+ end
+
specify "should be able to get current sequence value with SQL" do
begin
ORACLE_DB.create_table!(:foo){primary_key :id}
ORACLE_DB.fetch('SELECT seq_foo_id.nextval FROM DUAL').single_value.should == 1
ensure