spec/facemock/user_spec.rb in facemock-0.0.8 vs spec/facemock/user_spec.rb in facemock-0.0.9
- old
+ new
@@ -97,11 +97,11 @@
subject { Facemock::User.new.access_token }
it { is_expected.to be_kind_of String }
describe '.size' do
subject { Facemock::User.new.access_token.size }
- it { is_expected.to eq 128 }
+ it { is_expected.to be <= 255 }
end
end
describe '.application_id' do
subject { Facemock::User.new.application_id }
@@ -121,9 +121,26 @@
describe '.id' do
subject { Facemock::User.new(@opts).id }
it { is_expected.to be > 0 }
it { is_expected.to be < 100010000000000 }
+ end
+ end
+
+ # TODO : DOING
+ context 'with identifier option' do
+ before { @opts = { identifier: 100010000000000 } }
+ subject { Facemock::User.new(@opts) }
+ it { is_expected.to be_kind_of Facemock::User }
+
+ describe '.id' do
+ subject { Facemock::User.new(@opts).id }
+ it { is_expected.to eq @opts[:identifier] }
+ end
+
+ describe '.identifier' do
+ subject { Facemock::User.new(@opts).identifier }
+ it { is_expected.to eq @opts[:identifier] }
end
end
context 'with application_id option but it is not integer' do
before { @opts = { application_id: "test_id" } }