コード例 #1
0
ファイル: test.cashier.model.js プロジェクト: ramiavi/my-proj
        it('getView should return AddCardSc if it is turned on in OrgSettings', function() {
            Playtech.Variables.useSafeChargeToken = true;
            var cashierModel = new CashierModel({
                config: {
                    cashierType: 'ADD_PAYMENT_METHOD'
                }
            });

            cashierModel.getView().should.to.be.instanceof(AddcardScView);
        });
コード例 #2
0
ファイル: test.cashier.model.js プロジェクト: ramiavi/my-proj
    describe('Cashier model', function() {
        var cashierModel = new CashierModel({
                config: {}
            }),
            mapping = [
                {
                    cashierType: 'DEPOSIT',
                    view: DepositView
                }, {
                    cashierType: 'WITHDRAW',
                    view: WithdrawView
                }, {
                    cashierType: 'TRANSACTION_HISTORY',
                    view: TransactionHistoryView
                }, {
                    cashierType: 'PENDING_WITHDRAWALS',
                    view: PendingView
                }, {
                    cashierType: 'ADD_PAYMENT_METHOD',
                    view: AddcardView
                }
            ];

        mapping.forEach(function(payment) {
            it('getView method should return correct view, depends on config (' + payment.cashierType + ')', function() {
                cashierModel.set('config', {cashierType: payment.cashierType});
                cashierModel.getView().should.to.be.instanceof(payment.view);
            });
        });

        it('getView method should return deposit view by default', function() {
            cashierModel.set('config', {cashierType: ''});
            cashierModel.getView().should.to.be.instanceof(DepositView);
        });

        it('getView should return AddCardSc if it is turned on in OrgSettings', function() {
            Playtech.Variables.useSafeChargeToken = true;
            var cashierModel = new CashierModel({
                config: {
                    cashierType: 'ADD_PAYMENT_METHOD'
                }
            });

            cashierModel.getView().should.to.be.instanceof(AddcardScView);
        });
    });
コード例 #3
0
ファイル: test.cashier.model.js プロジェクト: ramiavi/my-proj
 it('getView method should return deposit view by default', function() {
     cashierModel.set('config', {cashierType: ''});
     cashierModel.getView().should.to.be.instanceof(DepositView);
 });
コード例 #4
0
ファイル: test.cashier.model.js プロジェクト: ramiavi/my-proj
 it('getView method should return correct view, depends on config (' + payment.cashierType + ')', function() {
     cashierModel.set('config', {cashierType: payment.cashierType});
     cashierModel.getView().should.to.be.instanceof(payment.view);
 });