Data dodania Pytanie
2017-12-03 21:12 Angular unit test with karma jasmine and browserify »
I am using this repo code to apply browserify in app. I want to write unit test for my app for this I include karma and karma browserify. My folder st...
(0) odpowiedzi
2017-12-02 21:12 Phpunit testing Laravel controller »
I'm building a small Laravel application and I would like test it using phpunit. Is a very simple application with one controller: namespace App\Http...
(1) odpowiedzi
2017-11-28 16:11 Django: How to keep db structure without data after running tests? »
I want to use the --keepdb option that allow to keep the database after running tests, because in my case, the creation of the dabatase takes a while ...
(1) odpowiedzi
2017-11-25 04:11 How to Unit Test Startup.cs in .NET Core »
How do people go about Unit Testing their Startup.cs classes in a .NET Core 2 application? All of the functionality seems to be provided by Static ext...
(1) odpowiedzi
2017-11-21 11:11 Mock Es6 classes using Jest »
I'm trying to mock an ES6 class with a constructor that receives parameters, and then mock different class functions on the class to continue with tes...
(1) odpowiedzi
2017-11-17 11:11 Asp.net Core Identity unit test controller actions »
I'm having a problem working out how and what to test. I have a controller that injects UserManager and calls the CreateAsync method to create a new ...
(1) odpowiedzi
2017-11-16 05:11 Rspec: Run specific unit test on every model unless whitelisted »
I have a multi-tenant SaaS app. I run a tenant security test on every tenant model. describe 'tenant security' do it "has only the current company...
(2) odpowiedzi
2017-11-16 00:11 Mocking Rspec any_instance_of method return value relative to instance's actual args »
I'm running into an issue where I'm trying to mock out an async method in a service class, but I want the result set to be based on the inputs to the ...
(1) odpowiedzi
2017-11-16 00:11 How to override default dependencies with Mockbox and Wirebox »
I have a logger service that has a ScopeStorage and a LoggerServiceDAO dependency and in my unit test I need to override these to use mock objects I h...
(1) odpowiedzi
2017-11-15 15:11 Test a controller in .Net Core always returns false? »
I write the following XUnit test to test a .Net Core WebApi controller's action: namespace VistaBest.XUnitTest.Api.Test { public class Account_Un...
(3) odpowiedzi
2017-11-15 11:11 Python equivalent of ruby rspec's "skip" and "pending" »
I'm coming from ruby to python. With ruby's rspec, I am used to using skip and pending to denote tests which should be skipped / cannot currently be e...
(1) odpowiedzi
2017-11-14 22:11 Rails controller testing: Testing in isolation or integration? »
I'm a bit confused when testing Rails controller, whether to test them in isolation(mocking, less DB hits: faster), or in an integration way(no mockin...
(3) odpowiedzi
2017-11-14 19:11 Testing ASP Net Core Application with SQLite throws unknown function: newid() »
I am testing my service layer which contains some calls to repositories by using the SQLite database provider. My test class has been written accordin...
(1) odpowiedzi
2017-11-14 11:11 How to mock a coldbox.system.web.context.RequestContext and initialize it? »
I have inherited some code at my work. A previous person wrote some ColdFusion code that looks like this: public struct function GetData(Event,RC,PRC...
(1) odpowiedzi
2017-11-13 20:11 Mocking dependencies inside of an AOP object using Testbox and AOP/1 »
I am curious if there is an easier way to mock the dependencies inside a component that uses AOP. For example I have a component that uses CRUD metho...
(0) odpowiedzi
2017-11-09 18:11 Rspec with string list argument matcher »
I'm writing an Rspec unit test that's trying to assert that a string passed to a function includes a list of substrings. Specifically, it is of the fo...
(0) odpowiedzi
2017-11-08 08:11 How to unit test ViewComponent.Invoke()? »
In ViewComponent object, HttpContext and User are read-only properties. How to unit test such a component? I'm using the MSTest Freamwork. The foll...
(1) odpowiedzi
2017-11-06 18:11 get state from redux react component in jest unit test »
It seems like you can't test state in react components once you make them connected components. Anyone know why? To illustrate the point, I have a tes...
(2) odpowiedzi
2017-11-05 21:11 How to write unit test for `downloadTask` with `completionHandler `? »
Here is my downloading function: // Download a file from the url to the local directory class func downloadUrl(url: URL, to dirUrl: URL, completion: ...
(1) odpowiedzi
2017-11-04 21:11 How do I create a Unit Test for a controller from a class from a MongoDb? »
The Profile class was made in a MongoDb and for the types I'm not quite sure how to use or create when testing the Profile class that is being passed ...
(0) odpowiedzi
2017-11-02 18:11 TypeError: can't define singleton (RSpec) »
This might look like a newbie issue but I'm stumped. I'm trying to build a simple Ruby slack service and I'm putting together some unit tests using RS...
(1) odpowiedzi
2017-11-02 17:11 How to test 3rd party APIs. Should I create unit or integration tests? »
I creating Web Api using .Net Core 2.0. I'm using Active Directory Graph API (https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-direc...
(2) odpowiedzi
2017-10-31 15:10 how to mock AuthenticateAsync on AspNetCore.Authentication.Abstractions »
i have an action on a controller which calls var result = await HttpContext.AuthenticateAsync(IdentityServerConstants.ExternalCookieAuthenticationSc...
(1) odpowiedzi
2017-10-29 09:10 How to make unit tests on local and on build server using postgres? »
I'm tyring to make unit tests for my node application. I'm using a postgresql database for the development and SQLite for the tests. However Sqlite do...
(1) odpowiedzi
2017-10-28 02:10 Ruby rspec mocking a class with an attribute that is a hash »
I have a class I am testing, call it myfoo. It accesses a class called yourbar. Specifically something like this... yourbar_obj.projects[project_na...
(1) odpowiedzi
2017-10-24 17:10 Static initializer doesn't run during JUnit tests »
I have an interesting JUnit problem here (JUnit 4.12). I have a base class that only has static methods. They have to be static, because of the way th...
(3) odpowiedzi
2017-10-21 19:10 Adding COM Objects to Asp Net Core »
I have a Unit Test project that makes use of Interop.ADODB. Here is the code: public CDO.Message ReadMessage(string emlFileName) { if (string.IsN...
(1) odpowiedzi
2017-10-19 06:10 Django: Class object has no attribute of standard function »
I have a model: class Order(models.Model): STATUS_CHOICES = ( (100, 'First'), (200, 'Second'), ) status = models.Integer...
(1) odpowiedzi
2017-10-15 17:10 Make a HTTP Request and populate it with data »
I'm trying to test a validate() method of a Service class, which accepts a Request object. Normally, when form on the frontend is submitted, I get tha...
(1) odpowiedzi
2017-10-10 23:10 Rspec post :create 'unknown keyword: ' »
I'm new to Rspec and I am trying to test my controller methods for basic functionality. I know I'm not supposed to test basic functionality, but I'm d...
(1) odpowiedzi
2017-10-09 19:10 Rspec tests failing if run all together »
I've 2 _spec files: the first containing unit test, the other one some integration tests. While running them by specifying file name they are alle gr...
(1) odpowiedzi
2017-10-09 14:10 Testing a method that delegates to another object »
This is a model in my project - class Subscription < ActiveRecord::Base def active? SubscriptionValidationPolicy.new(self).active? end en...
(1) odpowiedzi
2017-10-06 12:10 Laravel 5.5 Unit testing controller method »
I am trying to setup a simple unit test for one my controller method. The goals is to test if the a view has an expected value. /** * Does the home...
(1) odpowiedzi
2017-10-06 11:10 Jest play with Redux actions »
I'm trying to implement snapshots with jest and i ran into a problem. The solution is probably simple, but i can't find it. LoginForm.js class Login...
(3) odpowiedzi
2017-10-04 23:10 Rspec - archives array to match tested array »
I'm having this class method on my Post model for getting archives def self.archives Post.unscoped.select("YEAR(created_at) AS year, MONTHNAME(cr...
(2) odpowiedzi