lib/facemock/config.rb in facemock-0.0.6 vs lib/facemock/config.rb in facemock-0.0.7

- old
+ new

@@ -36,13 +36,14 @@ raise Facemock::Errors::IncorrectDataFormat.new "app id is empty" unless validate_id(app_id) raise Facemock::Errors::IncorrectDataFormat.new "app secret is empty" unless validate_secret(app_secret) raise Facemock::Errors::IncorrectDataFormat.new "users format is incorrect" unless validate_users(users) # Create application and user record - Facemock::Database::Application.new({ id: app_id, secret: app_secret }).save! - app = Facemock::FbGraph::Application.new(app_id, secret: app_secret) + app = Facemock::Database::Application.create!({ id: app_id, secret: app_secret }) users.each do |options| - app.test_user!(options) + user = Facemock::Database::User.new(options) + user.application_id = app.id + user.save! end end end private