aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-05 23:11:53 +0800
committerDan <danjm.com@gmail.com>2018-05-05 23:58:14 +0800
commit7c490098548522c16be1b1e84bce37f5bf87f1f4 (patch)
tree207cabcc9c8a07c411ae293894895f32905986be /ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js
parente869d09c79b0ba276cb6a82da1f01b2d4bfefce7 (diff)
downloadtangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar.gz
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar.bz2
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar.lz
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar.xz
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.tar.zst
tangerine-wallet-browser-7c490098548522c16be1b1e84bce37f5bf87f1f4.zip
Unit tests for containers, utils and selectors in send_/
Diffstat (limited to 'ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js')
-rw-r--r--ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js b/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js
index e69de29bb..122ad3265 100644
--- a/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js
+++ b/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-selectors.test.js
@@ -0,0 +1,47 @@
+import assert from 'assert'
+import {
+ getToDropdownOpen,
+ sendToIsInError,
+} from '../send-to-row.selectors.js'
+
+describe('send-to-row selectors', () => {
+
+ describe('getToDropdownOpen()', () => {
+ it('should return send.getToDropdownOpen', () => {
+ const state = {
+ send: {
+ toDropdownOpen: false,
+ },
+ }
+
+ assert.equal(getToDropdownOpen(state), false)
+ })
+ })
+
+ describe('sendToIsInError()', () => {
+ it('should return true if send.errors.to is truthy', () => {
+ const state = {
+ send: {
+ errors: {
+ to: 'abc',
+ },
+ },
+ }
+
+ assert.equal(sendToIsInError(state), true)
+ })
+
+ it('should return false if send.errors.to is falsy', () => {
+ const state = {
+ send: {
+ errors: {
+ to: null,
+ },
+ },
+ }
+
+ assert.equal(sendToIsInError(state), false)
+ })
+ })
+
+})