Sha256: 81c16a573290bf384e1b70407345f3d4b4be0e01b65b8c20b0054cee500db80a
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
require "spec_helper" describe "Ar2gostruct::Builder::ORM::QBS" do describe "#get_option" do it "should output QBS format tags" do orm_converter = Ar2gostruct::Builder::ORM::QBS.new User # id result = orm_converter.get_option User.columns[0] expect(result).to eq("qbs:\"pk,notnull\"") # email result = orm_converter.get_option User.columns[1] expect(result).to eq("qbs:\"notnull,default:''\"") # sign_in_count result = orm_converter.get_option User.columns[2] expect(result).to eq("qbs:\"notnull,default:'0'\"") # current_sign_in_at result = orm_converter.get_option User.columns[3] expect(result).to eq(nil) # last_sign_in_at result = orm_converter.get_option User.columns[4] expect(result).to eq(nil) # current_sign_in_ip result = orm_converter.get_option User.columns[5] expect(result).to eq(nil) # last_sign_in_ip result = orm_converter.get_option User.columns[6] expect(result).to eq(nil) # created_at result = orm_converter.get_option User.columns[7] expect(result).to eq("qbs:\"created\"") # updated_at result = orm_converter.get_option User.columns[8] expect(result).to eq("qbs:\"updated\"") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ar2gostruct-0.2.2 | spec/ar2gostruct/builder/orm/qbs_spec.rb |
ar2gostruct-0.2.1 | spec/ar2gostruct/builder/orm/qbs_spec.rb |
ar2gostruct-0.2.0 | spec/ar2gostruct/builder/orm/qbs_spec.rb |